summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2018-09-26 16:59:51 +0200
committerByteHamster <info@bytehamster.com>2018-09-26 16:59:51 +0200
commit9fee2110c792ace57bfc82a70f1b41dc50905b4b (patch)
tree68abff571799dc39dcc5023f578111651fafe81f /app/src/main/res
parent819d2df8ed42dd67c544def71462000935438323 (diff)
downloadAntennaPod-9fee2110c792ace57bfc82a70f1b41dc50905b4b.zip
Implemented number picker preference
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/numberpicker.xml16
-rw-r--r--app/src/main/res/xml/preferences_network.xml10
2 files changed, 21 insertions, 5 deletions
diff --git a/app/src/main/res/layout/numberpicker.xml b/app/src/main/res/layout/numberpicker.xml
new file mode 100644
index 000000000..813326bd6
--- /dev/null
+++ b/app/src/main/res/layout/numberpicker.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="32dp">
+
+ <EditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal"
+ android:ems="10"
+ android:selectAllOnFocus="true"
+ android:id="@+id/number" />
+
+</LinearLayout>
diff --git a/app/src/main/res/xml/preferences_network.xml b/app/src/main/res/xml/preferences_network.xml
index a40e54d31..c37a99465 100644
--- a/app/src/main/res/xml/preferences_network.xml
+++ b/app/src/main/res/xml/preferences_network.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:numberpicker="http://schemas.android.com/apk/de.danoeh.antennapod"
xmlns:search="http://schemas.android.com/apk/com.bytehamster.lib.preferencesearch">
<PreferenceCategory android:title="@string/automation">
<Preference
@@ -22,12 +22,12 @@
android:key="prefMobileUpdate"
android:summary="@string/pref_mobileUpdate_sum"
android:title="@string/pref_mobileUpdate_title"/>
- <EditTextPreference
+ <de.danoeh.antennapod.preferences.NumberPickerPreference
android:defaultValue="4"
- android:inputType="number"
+ numberpicker:minValue="1"
+ numberpicker:maxValue="50"
android:key="prefParallelDownloads"
- android:title="@string/pref_parallel_downloads_title"
- app:useStockLayout="true"/>
+ android:title="@string/pref_parallel_downloads_title"/>
<SwitchPreference
android:defaultValue="true"
android:enabled="true"