Skip to content

Commit

Permalink
Fix UI
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Nov 10, 2024
1 parent 2f56104 commit b023414
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
6 changes: 4 additions & 2 deletions V2rayNG/app/src/main/res/layout/activity_bypass_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

</LinearLayout>

Expand All @@ -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" />

</LinearLayout>
</LinearLayout>
Expand Down
4 changes: 3 additions & 1 deletion V2rayNG/app/src/main/res/layout/activity_routing_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

Expand Down Expand Up @@ -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" />
</LinearLayout>

<LinearLayout
Expand Down
7 changes: 5 additions & 2 deletions V2rayNG/app/src/main/res/layout/activity_sub_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

Expand Down Expand Up @@ -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" />

</LinearLayout>

Expand All @@ -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" />

</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -46,10 +46,10 @@

<ImageView
android:id="@+id/img_locked"
android:layout_gravity="center"
android:layout_marginStart="@dimen/padding_start"
android:layout_width="@dimen/padding"
android:layout_height="@dimen/padding"
android:layout_gravity="center"
android:layout_marginStart="@dimen/padding_start"
app:srcCompat="@drawable/ic_lock_24dp" />

</LinearLayout>
Expand All @@ -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">

<LinearLayout
android:id="@+id/layout_edit"
Expand Down Expand Up @@ -107,7 +107,8 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/chk_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
app:theme="@style/BrandedSwitch" />
</LinearLayout>
</LinearLayout>

Expand Down
7 changes: 4 additions & 3 deletions V2rayNG/app/src/main/res/layout/item_recycler_sub_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -55,9 +55,10 @@

<androidx.appcompat.widget.SwitchCompat
android:id="@+id/chk_enable"
android:text="@string/sub_setting_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:text="@string/sub_setting_enable"
app:theme="@style/BrandedSwitch" />
</LinearLayout>

</LinearLayout>
Expand Down
6 changes: 5 additions & 1 deletion V2rayNG/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</style>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" />

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
Expand All @@ -27,4 +27,8 @@
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>

<style name="BrandedSwitch" parent="AppTheme">
<item name="colorAccent">@color/color_fab_active</item>
</style>
</resources>

0 comments on commit b023414

Please sign in to comment.