Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

Commit d5eebe9

Browse files
sdspikesLyla
authored andcommitted
3.07 Add location setting xml
1 parent fd12441 commit d5eebe9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

app/src/main/res/values/strings.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@
1919
<string name="title_activity_detail">Details</string>
2020
<string name="title_activity_settings">Settings</string>
2121

22+
<!-- Label for the location preference [CHAR LIMIT=30] -->
23+
<string name="pref_location_label">Location</string>
24+
25+
<!-- Key name for storing location in SharedPreferences [CHAR LIMIT=NONE] -->
26+
<string name="pref_location_key" translatable="false">location</string>
27+
28+
<!-- Default postal code for location preference [CHAR LIMIT=NONE] -->
29+
<string name="pref_location_default" translatable="false">94043</string>
30+
2231
</resources>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent">
5+
6+
<EditTextPreference
7+
android:title="@string/pref_location_label"
8+
android:key="@string/pref_location_key"
9+
android:defaultValue="@string/pref_location_default"
10+
android:inputType="text"
11+
android:singleLine="true" />
12+
13+
</PreferenceScreen>

0 commit comments

Comments
 (0)