2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +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"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:background="?android:attr/selectableItemBackground"
android:baselineAligned="false"
android:gravity="center_vertical"
@@ -20,6 +21,8 @@
android:fadingEdge="horizontal"
android:singleLine="true"
android:text=""
android:textColor="@color/text_color"
tools:text="Item entry"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView

View File

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

View File

@@ -4,7 +4,7 @@
<color name="primaryDark">@android:color/white</color>
<color name="accent">#F67400</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="text_color_primary">@android:color/black</color>
<color name="text_color">@android:color/black</color>