Compare commits

..

No commits in common. "f6cb72368d45b09bc44379355bbc9ff36ee70689" and "33d00c27d755d37e1fcafb205f40b79c3c9a1b2f" have entirely different histories.

View File

@ -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 (displayedVehicles.get(position)) if (Boolean.TRUE.equals(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 (displ != displayedVehicles.get(0)) { if (!Objects.equals(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 && displayedVehicles.get(0)) { if (identical && Boolean.TRUE.equals(displayedVehicles.get(0))) {
imageViewCheckAll.setSelected(true); imageViewCheckAll.setSelected(true);
imageViewCheckAll.setBackgroundResource(R.drawable.check_all); imageViewCheckAll.setBackgroundResource(R.drawable.check_all);
} else { } else if (identical && Boolean.TRUE.equals(!displayedVehicles.get(0))) {
imageViewCheckAll.setSelected(false); imageViewCheckAll.setSelected(false);
imageViewCheckAll.setBackgroundResource(R.drawable.uncheck_all); imageViewCheckAll.setBackgroundResource(R.drawable.uncheck_all);
} }