|
@@ -46,8 +46,10 @@ public class StopRoutesPickerFragment extends Fragment {
|
46
|
46
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
47
|
47
|
public ImageView _imageView;
|
48
|
48
|
public TextView _textView;
|
|
49
|
+ public View _view;
|
49
|
50
|
public ViewHolder(View v) {
|
50
|
51
|
super(v);
|
|
52
|
+ _view = v;
|
51
|
53
|
}
|
52
|
54
|
}
|
53
|
55
|
|
|
@@ -74,11 +76,11 @@ public class StopRoutesPickerFragment extends Fragment {
|
74
|
76
|
.endConfig()
|
75
|
77
|
.buildRound(routeDbo.getId(), Color.parseColor("#" + routeDbo.getBgColor()));
|
76
|
78
|
holder._imageView.setImageDrawable(drawable);
|
77
|
|
- holder._textView.setText(routeDbo.getFullName());
|
78
|
|
- holder._textView.setOnClickListener(new View.OnClickListener() {
|
|
79
|
+ holder._textView.setText(routeDbo.getName());
|
|
80
|
+ holder._view.setOnClickListener(new View.OnClickListener() {
|
79
|
81
|
@Override
|
80
|
82
|
public void onClick(View v) {
|
81
|
|
-// onStopSelected(routeDbo);
|
|
83
|
+ v.setSelected(!v.isSelected());
|
82
|
84
|
}
|
83
|
85
|
});
|
84
|
86
|
}
|
|
@@ -105,6 +107,7 @@ public class StopRoutesPickerFragment extends Fragment {
|
105
|
107
|
_routesAdapter = new RoutesAdapter();
|
106
|
108
|
_listRoutes.setAdapter(_routesAdapter);
|
107
|
109
|
_listRoutes.setLayoutManager(new LinearLayoutManager(getContext()));
|
|
110
|
+ _listRoutes.setHasFixedSize(true);
|
108
|
111
|
|
109
|
112
|
loadRoutes();
|
110
|
113
|
|