Compare commits
2 Commits
33d00c27d7
...
f6cb72368d
Author | SHA1 | Date | |
---|---|---|---|
f6cb72368d | |||
97b7e2d9a7 |
@ -687,7 +687,7 @@ public class LiveActivity extends AbstractLiveActivity implements OnMapReadyCall
|
|||||||
// change check image for selected value
|
// change check image for selected value
|
||||||
VehiclesGridViewAdapter.ViewHolder viewLive = (VehiclesGridViewAdapter.ViewHolder) view.getTag();
|
VehiclesGridViewAdapter.ViewHolder viewLive = (VehiclesGridViewAdapter.ViewHolder) view.getTag();
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(displayedVehicles.get(position)))
|
if (displayedVehicles.get(position))
|
||||||
viewLive.imgViewChecked.setImageResource(R.drawable.checked);
|
viewLive.imgViewChecked.setImageResource(R.drawable.checked);
|
||||||
else
|
else
|
||||||
viewLive.imgViewChecked.setImageResource(R.drawable.unchecked);
|
viewLive.imgViewChecked.setImageResource(R.drawable.unchecked);
|
||||||
@ -695,16 +695,16 @@ public class LiveActivity extends AbstractLiveActivity implements OnMapReadyCall
|
|||||||
// check if all values are identical
|
// check if all values are identical
|
||||||
boolean identical = true;
|
boolean identical = true;
|
||||||
for (Boolean displ : displayedVehicles)
|
for (Boolean displ : displayedVehicles)
|
||||||
if (!Objects.equals(displ, displayedVehicles.get(0))) {
|
if (displ != displayedVehicles.get(0)) {
|
||||||
identical = false;
|
identical = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// change image when all values are identical
|
// change image when all values are identical
|
||||||
if (identical && Boolean.TRUE.equals(displayedVehicles.get(0))) {
|
if (identical && displayedVehicles.get(0)) {
|
||||||
imageViewCheckAll.setSelected(true);
|
imageViewCheckAll.setSelected(true);
|
||||||
imageViewCheckAll.setBackgroundResource(R.drawable.check_all);
|
imageViewCheckAll.setBackgroundResource(R.drawable.check_all);
|
||||||
} else if (identical && Boolean.TRUE.equals(!displayedVehicles.get(0))) {
|
} else {
|
||||||
imageViewCheckAll.setSelected(false);
|
imageViewCheckAll.setSelected(false);
|
||||||
imageViewCheckAll.setBackgroundResource(R.drawable.uncheck_all);
|
imageViewCheckAll.setBackgroundResource(R.drawable.uncheck_all);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user