diff --git a/src/main/java/org/kde/kdeconnect/UserInterface/List/DeviceItem.java b/src/main/java/org/kde/kdeconnect/UserInterface/List/DeviceItem.java index 79bcdcce..3c63258f 100644 --- a/src/main/java/org/kde/kdeconnect/UserInterface/List/DeviceItem.java +++ b/src/main/java/org/kde/kdeconnect/UserInterface/List/DeviceItem.java @@ -4,6 +4,7 @@ package org.kde.kdeconnect.UserInterface.List; import android.app.Activity; import android.content.Intent; import android.view.LayoutInflater; +import android.view.MotionEvent; import android.view.View; import android.widget.TextView; @@ -24,7 +25,10 @@ public class DeviceItem implements ListAdapter.Item { @Override public View inflateView(LayoutInflater layoutInflater) { - View v = layoutInflater.inflate(R.layout.list_item_entry, null); + final View v = layoutInflater.inflate(R.layout.list_item_entry, null); + + //Highlight when selected effect + v.setBackgroundDrawable(layoutInflater.getContext().getResources().getDrawable(R.drawable.kitkatcompatselector_list_selector_holo_dark)); TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title); if (titleView != null) titleView.setText(device.getName()); diff --git a/src/main/res/drawable-hdpi/kitkatcompatselector_list_activated_holo.9.png b/src/main/res/drawable-hdpi/kitkatcompatselector_list_activated_holo.9.png new file mode 100644 index 00000000..d0344937 Binary files /dev/null and b/src/main/res/drawable-hdpi/kitkatcompatselector_list_activated_holo.9.png differ diff --git a/src/main/res/drawable-hdpi/kitkatcompatselector_list_focused_holo.9.png b/src/main/res/drawable-hdpi/kitkatcompatselector_list_focused_holo.9.png new file mode 100644 index 00000000..8c03ae50 Binary files /dev/null and b/src/main/res/drawable-hdpi/kitkatcompatselector_list_focused_holo.9.png differ diff --git a/src/main/res/drawable-hdpi/kitkatcompatselector_list_longpressed_holo.9.png b/src/main/res/drawable-hdpi/kitkatcompatselector_list_longpressed_holo.9.png new file mode 100644 index 00000000..d0de5884 Binary files /dev/null and b/src/main/res/drawable-hdpi/kitkatcompatselector_list_longpressed_holo.9.png differ diff --git a/src/main/res/drawable-hdpi/kitkatcompatselector_list_pressed_holo_dark.9.png b/src/main/res/drawable-hdpi/kitkatcompatselector_list_pressed_holo_dark.9.png new file mode 100644 index 00000000..9cd7c556 Binary files /dev/null and b/src/main/res/drawable-hdpi/kitkatcompatselector_list_pressed_holo_dark.9.png differ diff --git a/src/main/res/drawable-hdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png b/src/main/res/drawable-hdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png new file mode 100644 index 00000000..f6fd30dc Binary files /dev/null and b/src/main/res/drawable-hdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png differ diff --git a/src/main/res/drawable-mdpi/kitkatcompatselector_list_activated_holo.9.png b/src/main/res/drawable-mdpi/kitkatcompatselector_list_activated_holo.9.png new file mode 100644 index 00000000..408e3680 Binary files /dev/null and b/src/main/res/drawable-mdpi/kitkatcompatselector_list_activated_holo.9.png differ diff --git a/src/main/res/drawable-mdpi/kitkatcompatselector_list_focused_holo.9.png b/src/main/res/drawable-mdpi/kitkatcompatselector_list_focused_holo.9.png new file mode 100644 index 00000000..19a95d23 Binary files /dev/null and b/src/main/res/drawable-mdpi/kitkatcompatselector_list_focused_holo.9.png differ diff --git a/src/main/res/drawable-mdpi/kitkatcompatselector_list_longpressed_holo.9.png b/src/main/res/drawable-mdpi/kitkatcompatselector_list_longpressed_holo.9.png new file mode 100644 index 00000000..f658b2ab Binary files /dev/null and b/src/main/res/drawable-mdpi/kitkatcompatselector_list_longpressed_holo.9.png differ diff --git a/src/main/res/drawable-mdpi/kitkatcompatselector_list_pressed_holo_dark.9.png b/src/main/res/drawable-mdpi/kitkatcompatselector_list_pressed_holo_dark.9.png new file mode 100644 index 00000000..2de626c0 Binary files /dev/null and b/src/main/res/drawable-mdpi/kitkatcompatselector_list_pressed_holo_dark.9.png differ diff --git a/src/main/res/drawable-mdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png b/src/main/res/drawable-mdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png new file mode 100644 index 00000000..92da2f0d Binary files /dev/null and b/src/main/res/drawable-mdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png differ diff --git a/src/main/res/drawable-xhdpi/kitkatcompatselector_list_activated_holo.9.png b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_activated_holo.9.png new file mode 100644 index 00000000..f5d6a5db Binary files /dev/null and b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_activated_holo.9.png differ diff --git a/src/main/res/drawable-xhdpi/kitkatcompatselector_list_focused_holo.9.png b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_focused_holo.9.png new file mode 100644 index 00000000..e5051b4d Binary files /dev/null and b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_focused_holo.9.png differ diff --git a/src/main/res/drawable-xhdpi/kitkatcompatselector_list_longpressed_holo.9.png b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_longpressed_holo.9.png new file mode 100644 index 00000000..b9652ca1 Binary files /dev/null and b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_longpressed_holo.9.png differ diff --git a/src/main/res/drawable-xhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png new file mode 100644 index 00000000..1f6f3cd3 Binary files /dev/null and b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png differ diff --git a/src/main/res/drawable-xhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png new file mode 100644 index 00000000..88726b69 Binary files /dev/null and b/src/main/res/drawable-xhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png differ diff --git a/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_activated_holo.9.png b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_activated_holo.9.png new file mode 100644 index 00000000..82f9632d Binary files /dev/null and b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_activated_holo.9.png differ diff --git a/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_focused_holo.9.png b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_focused_holo.9.png new file mode 100644 index 00000000..2ac927b6 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_focused_holo.9.png differ diff --git a/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_longpressed_holo.9.png b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_longpressed_holo.9.png new file mode 100644 index 00000000..5c750bb8 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_longpressed_holo.9.png differ diff --git a/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png new file mode 100644 index 00000000..8cdca02e Binary files /dev/null and b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_pressed_holo_dark.9.png differ diff --git a/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png new file mode 100644 index 00000000..908f76b4 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/kitkatcompatselector_list_selector_disabled_holo_dark.9.png differ diff --git a/src/main/res/drawable/kitkatcompatselector_activated_background_holo_dark.xml b/src/main/res/drawable/kitkatcompatselector_activated_background_holo_dark.xml new file mode 100644 index 00000000..747de57e --- /dev/null +++ b/src/main/res/drawable/kitkatcompatselector_activated_background_holo_dark.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/src/main/res/drawable/kitkatcompatselector_item_background_holo_dark.xml b/src/main/res/drawable/kitkatcompatselector_item_background_holo_dark.xml new file mode 100644 index 00000000..75eec01c --- /dev/null +++ b/src/main/res/drawable/kitkatcompatselector_item_background_holo_dark.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/src/main/res/drawable/kitkatcompatselector_list_selector_background_transition_holo_dark.xml b/src/main/res/drawable/kitkatcompatselector_list_selector_background_transition_holo_dark.xml new file mode 100644 index 00000000..1ac8306a --- /dev/null +++ b/src/main/res/drawable/kitkatcompatselector_list_selector_background_transition_holo_dark.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/src/main/res/drawable/kitkatcompatselector_list_selector_holo_dark.xml b/src/main/res/drawable/kitkatcompatselector_list_selector_holo_dark.xml new file mode 100644 index 00000000..13c4f776 --- /dev/null +++ b/src/main/res/drawable/kitkatcompatselector_list_selector_holo_dark.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + diff --git a/src/main/res/values-v11/themes_kitkatcompatselector.xml b/src/main/res/values-v11/themes_kitkatcompatselector.xml new file mode 100644 index 00000000..ac40c293 --- /dev/null +++ b/src/main/res/values-v11/themes_kitkatcompatselector.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/res/values/colors_kitkatcompatselector.xml b/src/main/res/values/colors_kitkatcompatselector.xml new file mode 100644 index 00000000..950493b0 --- /dev/null +++ b/src/main/res/values/colors_kitkatcompatselector.xml @@ -0,0 +1,4 @@ + + + #33b5e5 + diff --git a/src/main/res/values/styles_kitkatcompatselector.xml b/src/main/res/values/styles_kitkatcompatselector.xml new file mode 100644 index 00000000..dde24620 --- /dev/null +++ b/src/main/res/values/styles_kitkatcompatselector.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/res/values/themes_kitkatcompatselector.xml b/src/main/res/values/themes_kitkatcompatselector.xml new file mode 100644 index 00000000..af0599d2 --- /dev/null +++ b/src/main/res/values/themes_kitkatcompatselector.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file