2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-05 00:25:09 +00:00

Small redesign

Changes:
1. In the menu, the design of the selected item was changed, the icon of the current device was added and the image was removed
2. Changed the accent color to orange
3. Separators have been removed from almost all lists
4. The design of the selected item was changed in the menu, the icon of the current device was added and the image was removed
4. Changed the color of the toolbar to white or black (depending on the theme)
This commit is contained in:
Maxim Leshchenko
2021-03-07 10:55:47 +00:00
committed by Nicolas Fella
parent 061b9b63ee
commit 8ddb28c001
48 changed files with 682 additions and 382 deletions

View File

@@ -124,6 +124,24 @@ public class Device implements BaseLink.PacketReceiver {
return "desktop";
}
}
public Drawable getIcon(Context context) {
int drawableId;
switch (this) {
case Phone:
drawableId = R.drawable.ic_device_phone_32dp;
break;
case Tablet:
drawableId = R.drawable.ic_device_tablet_32dp;
break;
case Tv:
drawableId = R.drawable.ic_device_tv_32dp;
break;
default:
drawableId = R.drawable.ic_device_laptop_32dp;
}
return ContextCompat.getDrawable(context, drawableId);
}
}
public interface PairingCallback {
@@ -178,21 +196,7 @@ public class Device implements BaseLink.PacketReceiver {
}
public Drawable getIcon() {
int drawableId;
switch (deviceType) {
case Phone:
drawableId = R.drawable.ic_device_phone_32dp;
break;
case Tablet:
drawableId = R.drawable.ic_device_tablet_32dp;
break;
case Tv:
drawableId = R.drawable.ic_device_tv_32dp;
break;
default:
drawableId = R.drawable.ic_device_laptop_32dp;
}
return ContextCompat.getDrawable(context, drawableId);
return deviceType.getIcon(context);
}
public DeviceType getDeviceType() {