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

Prettier widget

This commit is contained in:
Albert Vaca Cintora
2023-06-04 16:14:58 +02:00
parent afd4219732
commit d4076245dd
3 changed files with 21 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:baselineAligned="false" android:baselineAligned="false"
android:gravity="center_vertical" android:gravity="center_vertical"
@@ -20,6 +21,8 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:singleLine="true" android:singleLine="true"
android:text="" android:text=""
android:textColor="@color/text_color"
tools:text="Item entry"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView <TextView

View File

@@ -1,36 +1,42 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:orientation="vertical"
android:background="@color/on_secondary" android:background="@color/activity_background"
android:theme="@style/KdeConnectTheme" android:theme="@style/KdeConnectTheme"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_width="match_parent"> android:layout_width="match_parent"
tools:ignore="RtlSymmetry">
<LinearLayout <LinearLayout
android:id="@+id/runcommandWidgetTitleHeader" android:id="@+id/runcommandWidgetTitleHeader"
android:background="@color/primary" android:background="@color/on_secondary"
android:gravity="center_vertical|start" android:gravity="center_vertical|start"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<ImageView <ImageView
android:paddingTop="6dip" android:padding="8dip"
android:paddingBottom="6dip" android:paddingEnd="6dip"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_kde_48dp" android:tint="@color/text_color"
android:contentDescription="@string/device_icon_description"/> android:src="@drawable/ic_kde_24dp"
android:contentDescription="@string/device_icon_description"
tools:ignore="UseAppTint"/> <!-- can't use app:tint in RemoteView -->
<TextView <TextView
android:id="@+id/runcommandWidgetTitle" android:id="@+id/runcommandWidgetTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="marquee" android:ellipsize="marquee"
android:textColor="@color/text_color"
android:text="@string/kde_connect"
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:singleLine="true" android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> </LinearLayout>
<ListView <ListView
android:id="@+id/run_commands_list" android:id="@+id/run_commands_list"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -48,5 +54,6 @@
android:paddingStart="8dip" android:paddingStart="8dip"
android:text="@string/runcommand_notreachable" android:text="@string/runcommand_notreachable"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:drawableStart="@drawable/ic_error_outline_48dp"/> android:drawableStart="@drawable/ic_error_outline_48dp"
tools:ignore="UseCompatTextViewDrawableXml" /> <!-- can't use app:drawableStart in RemoteView -->
</LinearLayout> </LinearLayout>

View File

@@ -4,7 +4,7 @@
<color name="primaryDark">@android:color/white</color> <color name="primaryDark">@android:color/white</color>
<color name="accent">#F67400</color> <color name="accent">#F67400</color>
<color name="disabled_grey">#EEEEEE</color> <color name="disabled_grey">#EEEEEE</color>
<color name="on_secondary">@android:color/white</color> <color name="on_secondary">#C8C8C8</color>
<color name="on_high_contrast">@android:color/black</color> <color name="on_high_contrast">@android:color/black</color>
<color name="text_color_primary">@android:color/black</color> <color name="text_color_primary">@android:color/black</color>
<color name="text_color">@android:color/black</color> <color name="text_color">@android:color/black</color>