From 45b2ac263f1080492e4327209966443b038b0c3c Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Wed, 8 Jul 2020 11:03:04 +0530 Subject: [PATCH] Enable vector drawable support and override some layouts for higher API levels. --- build.gradle | 1 + .../pairing_explanation_not_trusted.xml | 14 ++++++++++++++ .../pairing_explanation_text_no_wifi.xml | 14 ++++++++++++++ res/layout/activity_bigscreen.xml | 15 ++++++++------- res/layout/activity_presenter.xml | 5 +++-- res/layout/list_item_systemvolume.xml | 2 +- res/layout/mpris_control.xml | 14 +++++++------- res/layout/pairing_explanation_not_trusted.xml | 12 +++++------- res/layout/pairing_explanation_text_no_wifi.xml | 12 +++++------- res/layout/widget_remotecommandplugin.xml | 5 +++-- 10 files changed, 61 insertions(+), 33 deletions(-) create mode 100644 res/layout-v23/pairing_explanation_not_trusted.xml create mode 100644 res/layout-v23/pairing_explanation_text_no_wifi.xml diff --git a/build.gradle b/build.gradle index 56b2558e..fa30527c 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' multiDexEnabled true + vectorDrawables.useSupportLibrary true } dexOptions { javaMaxHeapSize "2g" diff --git a/res/layout-v23/pairing_explanation_not_trusted.xml b/res/layout-v23/pairing_explanation_not_trusted.xml new file mode 100644 index 00000000..f1a30a94 --- /dev/null +++ b/res/layout-v23/pairing_explanation_not_trusted.xml @@ -0,0 +1,14 @@ + + + + diff --git a/res/layout-v23/pairing_explanation_text_no_wifi.xml b/res/layout-v23/pairing_explanation_text_no_wifi.xml new file mode 100644 index 00000000..93ed7592 --- /dev/null +++ b/res/layout-v23/pairing_explanation_text_no_wifi.xml @@ -0,0 +1,14 @@ + + + + diff --git a/res/layout/activity_bigscreen.xml b/res/layout/activity_bigscreen.xml index 5fa02ad4..eb8b3863 100644 --- a/res/layout/activity_bigscreen.xml +++ b/res/layout/activity_bigscreen.xml @@ -1,5 +1,6 @@ diff --git a/res/layout/activity_presenter.xml b/res/layout/activity_presenter.xml index eb237fc9..e401577e 100644 --- a/res/layout/activity_presenter.xml +++ b/res/layout/activity_presenter.xml @@ -1,5 +1,6 @@ diff --git a/res/layout/list_item_systemvolume.xml b/res/layout/list_item_systemvolume.xml index 1abb78f7..28b0a717 100644 --- a/res/layout/list_item_systemvolume.xml +++ b/res/layout/list_item_systemvolume.xml @@ -27,7 +27,7 @@ android:background="@android:color/transparent" android:contentDescription="@string/mute" android:scaleType="fitXY" - android:src="@drawable/ic_volume_black" + app:srcCompat="@drawable/ic_volume_black" app:tint="?attr/colorHighContrast" /> @@ -89,7 +89,7 @@ android:layout_height="fill_parent" android:layout_weight="0.25" android:contentDescription="@string/mpris_ff" - android:src="@drawable/ic_fast_forward_black" + app:srcCompat="@drawable/ic_fast_forward_black" android:theme="@style/DisableableButton" /> @@ -155,7 +155,7 @@ android:layout_weight="0" android:contentDescription="@string/mpris_volume" android:maxWidth="30dip" - android:src="@drawable/ic_volume_black" + app:srcCompat="@drawable/ic_volume_black" app:tint="?attr/colorHighContrast" /> diff --git a/res/layout/pairing_explanation_not_trusted.xml b/res/layout/pairing_explanation_not_trusted.xml index 7feb2e6f..4ba71416 100644 --- a/res/layout/pairing_explanation_not_trusted.xml +++ b/res/layout/pairing_explanation_not_trusted.xml @@ -1,16 +1,14 @@ - + android:text="@string/on_non_trusted_message"> diff --git a/res/layout/pairing_explanation_text_no_wifi.xml b/res/layout/pairing_explanation_text_no_wifi.xml index adb7fb0a..d05f97a9 100644 --- a/res/layout/pairing_explanation_text_no_wifi.xml +++ b/res/layout/pairing_explanation_text_no_wifi.xml @@ -1,16 +1,14 @@ - + android:text="@string/no_wifi"> diff --git a/res/layout/widget_remotecommandplugin.xml b/res/layout/widget_remotecommandplugin.xml index 1cd959d8..e91534fb 100644 --- a/res/layout/widget_remotecommandplugin.xml +++ b/res/layout/widget_remotecommandplugin.xml @@ -41,11 +41,12 @@ android:id="@+id/not_reachable_message" android:layout_width="match_parent" android:layout_height="match_parent" + android:drawableStart="@drawable/ic_error_outline_black_48dp" android:drawableLeft="@drawable/ic_error_outline_black_48dp" android:drawablePadding="8dip" - android:paddingLeft="8dip" - android:drawableStart="@drawable/ic_error_outline_black_48dp" android:gravity="center_vertical" + android:paddingStart="8dip" + android:paddingLeft="8dip" android:text="@string/unreachable_description" android:textAppearance="?android:attr/textAppearanceMedium" /> \ No newline at end of file