diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapter.java index a1ed4359a..92ca09b5f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapter.java @@ -60,11 +60,11 @@ public class GBDeviceAdapter extends ArrayAdapter { if (device.isBusy()) { deviceStatusLabel.setText(device.getBusyTask()); busyIndicator.setVisibility(View.VISIBLE); - batteryLabel.setVisibility(View.GONE); - batteryStatusLabel.setVisibility(View.GONE); + batteryLabel.setVisibility(View.INVISIBLE); + batteryStatusLabel.setVisibility(View.INVISIBLE); } else { deviceStatusLabel.setText(device.getStateString()); - busyIndicator.setVisibility(View.GONE); + busyIndicator.setVisibility(View.INVISIBLE); batteryLabel.setVisibility(View.VISIBLE); batteryStatusLabel.setVisibility(View.VISIBLE); } @@ -113,13 +113,25 @@ public class GBDeviceAdapter extends ArrayAdapter { switch (device.getType()) { case PEBBLE: - deviceImageView.setImageResource(R.drawable.ic_device_pebble); + if (device.isConnected()) { + deviceImageView.setImageResource(R.drawable.ic_device_pebble); + } else { + deviceImageView.setImageResource(R.drawable.ic_device_pebble_disabled); + } break; case MIBAND: - deviceImageView.setImageResource(R.drawable.ic_device_miband); + if (device.isConnected()) { + deviceImageView.setImageResource(R.drawable.ic_device_miband); + } else { + deviceImageView.setImageResource(R.drawable.ic_device_miband_disabled); + } break; default: - deviceImageView.setImageResource(R.drawable.ic_launcher); + if (device.isConnected()) { + deviceImageView.setImageResource(R.drawable.ic_launcher); + } else { + deviceImageView.setImageResource(R.drawable.ic_device_default_disabled); + } } return view; diff --git a/app/src/main/res/drawable-hdpi/ic_device_pebble_disabled.png b/app/src/main/res/drawable-hdpi/ic_device_pebble_disabled.png new file mode 100644 index 000000000..c5772510c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_device_pebble_disabled.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_device_pebble_disabled.png b/app/src/main/res/drawable-mdpi/ic_device_pebble_disabled.png new file mode 100644 index 000000000..675a26a7f Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_device_pebble_disabled.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_device_pebble_disabled.png b/app/src/main/res/drawable-xhdpi/ic_device_pebble_disabled.png new file mode 100644 index 000000000..705aad25e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_device_pebble_disabled.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_device_pebble_disabled.png b/app/src/main/res/drawable-xxhdpi/ic_device_pebble_disabled.png new file mode 100644 index 000000000..c1eebfd59 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_device_pebble_disabled.png differ diff --git a/app/src/main/res/layout/device_item.xml b/app/src/main/res/layout/device_item.xml index 5813e1a62..18431f2b8 100644 --- a/app/src/main/res/layout/device_item.xml +++ b/app/src/main/res/layout/device_item.xml @@ -73,17 +73,15 @@ -