4 |
import java.util.List; |
import java.util.List; |
5 |
|
|
6 |
import android.content.Context; |
import android.content.Context; |
|
import android.util.Log; |
|
7 |
import android.view.LayoutInflater; |
import android.view.LayoutInflater; |
8 |
import android.view.View; |
import android.view.View; |
9 |
import android.view.ViewGroup; |
import android.view.ViewGroup; |
57 |
public View getView(int position, View convertView, ViewGroup parent) { |
public View getView(int position, View convertView, ViewGroup parent) { |
58 |
StationBean station = stations.get(position); |
StationBean station = stations.get(position); |
59 |
|
|
60 |
View root; |
View root = inflater.inflate(R.layout.stationrow , parent, false); |
|
if (convertView == null || convertView.getId() != R.id.StationRow) { |
|
|
root = inflater.inflate(R.layout.stationrow , parent, false); |
|
|
} else { |
|
|
root = convertView; |
|
|
} |
|
|
|
|
61 |
TextView tview = (TextView) root.findViewById(R.id.stationName); |
TextView tview = (TextView) root.findViewById(R.id.stationName); |
62 |
tview.setText(station.getName()); |
tview.setText(station.getName()); |
63 |
|
|