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