Skip to content

Commit 6626184

Browse files
Add arrow icon for internal links in settings
This commit adds a right-facing arrow icon to the "Permissions" and "Open source licenses" items in the settings menu. This provides a clearer visual cue that these are internal navigation links. The changes include: - A new vector drawable for the arrow icon (`ic_internal_arrow.xml`). - A new layout (`item_preference_widget_open_internal.xml`) to display the icon with a vertical divider. - An update to `preferences_settings.xml` to apply the new widget layout to the relevant preference items.
1 parent 4d36293 commit 6626184

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
8+
<path
9+
android:fillColor="?attr/colorOutline"
10+
android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z" />
11+
</vector>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:gravity="center"
7+
android:orientation="horizontal">
8+
9+
<View
10+
android:layout_width="8dp"
11+
android:layout_height="match_parent"
12+
android:background="@android:color/transparent" />
13+
14+
<View
15+
android:layout_width="1dp"
16+
android:layout_height="match_parent"
17+
android:background="?attr/colorOutline" />
18+
19+
<androidx.appcompat.widget.AppCompatImageView
20+
android:layout_width="24dp"
21+
android:layout_height="24dp"
22+
android:contentDescription="@null"
23+
app:tint="?attr/colorOutline"
24+
app:srcCompat="@drawable/ic_internal_arrow" />
25+
26+
<View
27+
android:layout_width="8dp"
28+
android:layout_height="match_parent"
29+
android:background="@android:color/transparent" />
30+
31+
</LinearLayout>

app/src/main/res/xml/preferences_settings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
app:icon="@drawable/ic_permissions"
135135
app:iconSpaceReserved="false"
136136
app:layout="@layout/item_preference"
137+
app:widgetLayout="@layout/item_preference_widget_open_internal"
137138
app:title="@string/permissions">
138139
<intent
139140
android:targetClass="com.d4rk.androidtutorials.java.ui.screens.settings.screens.permissions.PermissionsActivity"
@@ -144,6 +145,7 @@
144145
app:key="@string/key_open_source_licenses"
145146
app:iconSpaceReserved="false"
146147
app:layout="@layout/item_preference"
148+
app:widgetLayout="@layout/item_preference_widget_open_internal"
147149
app:title="@string/open_source_licenses" />
148150
<androidx.preference.Preference
149151
app:icon="@drawable/ic_license"

0 commit comments

Comments
 (0)