diff --git a/res/drawable-hdpi/divider_horizontal_holo_light.9.png b/res/drawable-hdpi/divider_horizontal_holo_light.9.png
new file mode 100644
index 00000000..ea38ebbb
Binary files /dev/null and b/res/drawable-hdpi/divider_horizontal_holo_light.9.png differ
diff --git a/res/drawable-v21/list_divider.xml b/res/drawable-v21/list_divider.xml
new file mode 100644
index 00000000..cd8cd2b6
--- /dev/null
+++ b/res/drawable-v21/list_divider.xml
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/res/drawable/list_divider.xml b/res/drawable/list_divider.xml
new file mode 100644
index 00000000..c9a33827
--- /dev/null
+++ b/res/drawable/list_divider.xml
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/res/layout/activity_device.xml b/res/layout/activity_device.xml
index f7d4466f..d00dcea2 100644
--- a/res/layout/activity_device.xml
+++ b/res/layout/activity_device.xml
@@ -5,7 +5,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:padding="@dimen/activity_vertical_margin"
tools:context="org.kde.kdeconnect.UserInterface.DeviceFragment">
+ android:orientation="vertical"
+ android:padding="@dimen/activity_vertical_margin"
+ android:visibility="gone">
+ android:visibility="gone"/>
+ android:textAppearance="?android:attr/textAppearanceMedium"/>
+ android:textColor="@android:color/white"/>
+ android:textColor="@android:color/white"/>
+ android:textColor="@android:color/white"/>
@@ -73,9 +73,10 @@
android:id="@+id/error_message_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="horizontal"
android:gravity="center"
- android:visibility="gone" >
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:visibility="gone">
+ android:visibility="gone"/>
@@ -115,6 +116,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
- tools:context=".DeviceActivity" />
-
+ android:divider="@drawable/list_divider"
+ tools:context=".DeviceActivity"
+ tools:listitem="@layout/list_item_with_icon_entry"/>
diff --git a/res/layout/list_item_with_icon_entry.xml b/res/layout/list_item_with_icon_entry.xml
index ebeccff3..c636eeec 100644
--- a/res/layout/list_item_with_icon_entry.xml
+++ b/res/layout/list_item_with_icon_entry.xml
@@ -1,60 +1,59 @@
+
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp">
-
-
-
-
-
+ android:layout_marginLeft="12dp"
+ android:layout_marginStart="12dp"
+ android:contentDescription="@string/device_icon_description"
+ android:src="@drawable/ic_device_laptop"
+ app:tint="?attr/colorControlNormal"/>
-
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java
index 6a9c7974..e88beede 100644
--- a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java
+++ b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java
@@ -42,6 +42,7 @@ import org.kde.kdeconnect.Helpers.NetworkHelper;
import org.kde.kdeconnect.Helpers.SecurityHelpers.SslHelper;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.List.CustomItem;
+import org.kde.kdeconnect.UserInterface.List.FailedPluginListItem;
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
import org.kde.kdeconnect.UserInterface.List.PluginItem;
import org.kde.kdeconnect.UserInterface.List.SmallEntryItem;
@@ -378,9 +379,9 @@ public class DeviceFragment extends Fragment {
TextView header = new TextView(mActivity);
header.setPadding(
- 0,
+ ((int) (16 * getResources().getDisplayMetrics().density)),
((int) (28 * getResources().getDisplayMetrics().density)),
- 0,
+ ((int) (16 * getResources().getDisplayMetrics().density)),
((int) (8 * getResources().getDisplayMetrics().density))
);
header.setOnClickListener(null);
diff --git a/src/org/kde/kdeconnect/UserInterface/FailedPluginListItem.java b/src/org/kde/kdeconnect/UserInterface/List/FailedPluginListItem.java
similarity index 81%
rename from src/org/kde/kdeconnect/UserInterface/FailedPluginListItem.java
rename to src/org/kde/kdeconnect/UserInterface/List/FailedPluginListItem.java
index 7ab7ce38..bb02445e 100644
--- a/src/org/kde/kdeconnect/UserInterface/FailedPluginListItem.java
+++ b/src/org/kde/kdeconnect/UserInterface/List/FailedPluginListItem.java
@@ -17,18 +17,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package org.kde.kdeconnect.UserInterface;
+package org.kde.kdeconnect.UserInterface.List;
import org.kde.kdeconnect.Plugins.Plugin;
-import org.kde.kdeconnect.UserInterface.List.SmallEntryItem;
-class FailedPluginListItem extends SmallEntryItem {
+public class FailedPluginListItem extends SmallEntryItem {
- interface Action {
+ public interface Action {
void action(Plugin plugin);
}
- FailedPluginListItem(Plugin plugin, Action action) {
+ public FailedPluginListItem(Plugin plugin, Action action) {
super(plugin.getDisplayName(), (view) -> action.action(plugin));
}
}
\ No newline at end of file
diff --git a/src/org/kde/kdeconnect/UserInterface/List/SmallEntryItem.java b/src/org/kde/kdeconnect/UserInterface/List/SmallEntryItem.java
index c8e1b581..4469fdb2 100644
--- a/src/org/kde/kdeconnect/UserInterface/List/SmallEntryItem.java
+++ b/src/org/kde/kdeconnect/UserInterface/List/SmallEntryItem.java
@@ -45,6 +45,12 @@ public class SmallEntryItem implements ListAdapter.Item {
@Override
public View inflateView(LayoutInflater layoutInflater) {
View v = layoutInflater.inflate(android.R.layout.simple_list_item_1, null);
+ v.setPadding(
+ ((int) (28 * layoutInflater.getContext().getResources().getDisplayMetrics().density)),
+ 0,
+ ((int) (28 * layoutInflater.getContext().getResources().getDisplayMetrics().density)),
+ 0
+ );
TextView titleView = v.findViewById(android.R.id.text1);
if (titleView != null) {