make use of some new icons

This commit is contained in:
Andreas Shimokawa 2015-12-11 21:38:43 +01:00
parent c9d1b9dd4a
commit b1954eec3e
2 changed files with 17 additions and 11 deletions

View File

@ -50,7 +50,7 @@ public class GBDeviceAppAdapter extends ArrayAdapter<GBDeviceApp> {
deviceImageView.setImageResource(R.drawable.ic_watchface); deviceImageView.setImageResource(R.drawable.ic_watchface);
break; break;
default: default:
deviceImageView.setImageResource(R.drawable.ic_device_pebble); deviceImageView.setImageResource(R.drawable.ic_watchapp);
} }
return view; return view;

View File

@ -72,9 +72,11 @@ public class PBWInstallHandler implements InstallHandler {
} }
GenericItem installItem = new GenericItem(); GenericItem installItem = new GenericItem();
installItem.setIcon(R.drawable.ic_device_pebble); installItem.setIcon(R.drawable.ic_watchapp); // FIXME: do not set twice
if (mPBWReader.isFirmware()) { if (mPBWReader.isFirmware()) {
installItem.setIcon(R.drawable.ic_firmware);
String hwRevision = mPBWReader.getHWRevision(); String hwRevision = mPBWReader.getHWRevision();
if (hwRevision != null && hwRevision.equals(device.getHardwareVersion())) { if (hwRevision != null && hwRevision.equals(device.getHardwareVersion())) {
installItem.setName(mContext.getString(R.string.pbw_installhandler_pebble_firmware, "")); installItem.setName(mContext.getString(R.string.pbw_installhandler_pebble_firmware, ""));
@ -96,15 +98,19 @@ public class PBWInstallHandler implements InstallHandler {
installItem.setName(app.getName()); installItem.setName(app.getName());
installItem.setDetails(mContext.getString(R.string.pbwinstallhandler_app_item, app.getCreator(), app.getVersion())); installItem.setDetails(mContext.getString(R.string.pbwinstallhandler_app_item, app.getCreator(), app.getVersion()));
int drawable; int drawable;
switch (app.getType()) { if (mPBWReader.isLanguage()) {
case WATCHFACE: drawable = R.drawable.ic_languagepack;
drawable = R.drawable.ic_watchface; } else {
break; switch (app.getType()) {
case APP_ACTIVITYTRACKER: case WATCHFACE:
drawable = R.drawable.ic_activitytracker; drawable = R.drawable.ic_watchface;
break; break;
default: case APP_ACTIVITYTRACKER:
drawable = R.drawable.ic_device_pebble; drawable = R.drawable.ic_activitytracker;
break;
default:
drawable = R.drawable.ic_watchapp;
}
} }
installItem.setIcon(drawable); installItem.setIcon(drawable);