From b023414cd03460d42f45ce496d2b723977f2bffb Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:57:06 +0800 Subject: [PATCH] Fix UI https://github.com/2dust/v2rayNG/issues/3866 --- .../src/main/res/layout/activity_bypass_list.xml | 6 ++++-- .../src/main/res/layout/activity_routing_edit.xml | 4 +++- .../app/src/main/res/layout/activity_sub_edit.xml | 7 +++++-- .../res/layout/item_recycler_routing_setting.xml | 13 +++++++------ .../main/res/layout/item_recycler_sub_setting.xml | 7 ++++--- V2rayNG/app/src/main/res/values/styles.xml | 6 +++++- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/V2rayNG/app/src/main/res/layout/activity_bypass_list.xml b/V2rayNG/app/src/main/res/layout/activity_bypass_list.xml index 526ade1c..2bb05e85 100644 --- a/V2rayNG/app/src/main/res/layout/activity_bypass_list.xml +++ b/V2rayNG/app/src/main/res/layout/activity_bypass_list.xml @@ -40,7 +40,8 @@ android:layout_height="wrap_content" android:maxLines="2" android:text="@string/title_pref_per_app_proxy" - android:textAppearance="@style/TextAppearance.AppCompat.Small" /> + android:textAppearance="@style/TextAppearance.AppCompat.Small" + app:theme="@style/BrandedSwitch" /> @@ -58,7 +59,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/switch_bypass_apps_mode" - android:textAppearance="@style/TextAppearance.AppCompat.Small" /> + android:textAppearance="@style/TextAppearance.AppCompat.Small" + app:theme="@style/BrandedSwitch" /> diff --git a/V2rayNG/app/src/main/res/layout/activity_routing_edit.xml b/V2rayNG/app/src/main/res/layout/activity_routing_edit.xml index 5e84ca14..5d8b768c 100644 --- a/V2rayNG/app/src/main/res/layout/activity_routing_edit.xml +++ b/V2rayNG/app/src/main/res/layout/activity_routing_edit.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" android:fitsSystemWindows="true" tools:context=".ui.SubSettingActivity"> @@ -45,7 +46,8 @@ android:id="@+id/chk_locked" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/routing_settings_locked" /> + android:text="@string/routing_settings_locked" + app:theme="@style/BrandedSwitch" /> @@ -109,7 +110,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="@dimen/padding_start" - android:paddingEnd="@dimen/padding_end" /> + android:paddingEnd="@dimen/padding_end" + app:theme="@style/BrandedSwitch" /> @@ -131,7 +133,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="@dimen/padding_start" - android:paddingEnd="@dimen/padding_end" /> + android:paddingEnd="@dimen/padding_end" + app:theme="@style/BrandedSwitch" /> diff --git a/V2rayNG/app/src/main/res/layout/item_recycler_routing_setting.xml b/V2rayNG/app/src/main/res/layout/item_recycler_routing_setting.xml index c36eb795..daf1020f 100644 --- a/V2rayNG/app/src/main/res/layout/item_recycler_routing_setting.xml +++ b/V2rayNG/app/src/main/res/layout/item_recycler_routing_setting.xml @@ -19,9 +19,9 @@ android:layout_width="match_parent" android:layout_height="@dimen/sub_height" android:layout_gravity="center" + android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true" - android:background="?attr/selectableItemBackground" android:gravity="center" android:nextFocusRight="@+id/layout_edit" android:orientation="horizontal"> @@ -46,10 +46,10 @@ @@ -76,9 +76,9 @@ android:layout_width="wrap_content" android:layout_height="@dimen/sub_height" android:gravity="center" + android:orientation="vertical" android:paddingStart="@dimen/padding_start" - android:paddingEnd="@dimen/padding_end" - android:orientation="vertical"> + android:paddingEnd="@dimen/padding_end"> + android:layout_height="wrap_content" + app:theme="@style/BrandedSwitch" /> diff --git a/V2rayNG/app/src/main/res/layout/item_recycler_sub_setting.xml b/V2rayNG/app/src/main/res/layout/item_recycler_sub_setting.xml index caa8e696..a2ad1817 100644 --- a/V2rayNG/app/src/main/res/layout/item_recycler_sub_setting.xml +++ b/V2rayNG/app/src/main/res/layout/item_recycler_sub_setting.xml @@ -19,9 +19,9 @@ android:layout_width="match_parent" android:layout_height="@dimen/sub_height" android:layout_gravity="center" + android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true" - android:background="?attr/selectableItemBackground" android:gravity="center" android:nextFocusRight="@+id/layout_edit" android:orientation="horizontal"> @@ -55,9 +55,10 @@ + android:layout_height="wrap_content" + android:text="@string/sub_setting_enable" + app:theme="@style/BrandedSwitch" /> diff --git a/V2rayNG/app/src/main/res/values/styles.xml b/V2rayNG/app/src/main/res/values/styles.xml index aae3aa73..d6558e07 100644 --- a/V2rayNG/app/src/main/res/values/styles.xml +++ b/V2rayNG/app/src/main/res/values/styles.xml @@ -14,7 +14,7 @@ - + + +