mirror of
https://github.com/gsantner/dandelion
synced 2025-12-09 05:41:12 +01:00
Added first design of a SettingsActivity
This commit is contained in:
parent
cb3fc08df6
commit
ec922f139f
5 changed files with 126 additions and 1 deletions
33
app/src/main/res/values/strings-preferences.xml
Normal file
33
app/src/main/res/values/strings-preferences.xml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Categories -->
|
||||
<string name="pref_category_visuals">Look and Feel</string>
|
||||
<string name="pref_category_network">Network</string>
|
||||
|
||||
<!-- Visuals -->
|
||||
<!-- Font size -->
|
||||
<string name="pref_title_font_size">Font size</string>
|
||||
<array name="pref_entries_font_size">
|
||||
<item>Normal</item>
|
||||
<item>Large</item>
|
||||
<item>Huge</item>
|
||||
</array>
|
||||
<array name="pref_entry_values_font_size" translatable="false">
|
||||
<item>normal</item>
|
||||
<item>big</item>
|
||||
<item>huge</item>
|
||||
</array>
|
||||
<!-- Mobile/Desktop view -->
|
||||
<string name="pref_title_desktop_view">Desktop mode</string>
|
||||
<string name="pref_desc_desktop_view">Load full desktop site instead of mobile view</string>
|
||||
|
||||
<!-- Load images -->
|
||||
<string name="pref_title_load_images">Load images</string>
|
||||
<string name="pref_desc_load_images">You can disable image loading to safe mobile data</string>
|
||||
|
||||
<!-- Proxy -->
|
||||
<string name="pref_title_proxy_enabled">Enable Proxy</string>
|
||||
<string name="pref_title_proxy_host">Host</string>
|
||||
<string name="pref_title_proxy_port">Port</string>
|
||||
|
||||
</resources>
|
||||
43
app/src/main/res/xml/preferences.xml
Normal file
43
app/src/main/res/xml/preferences.xml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_category_visuals"
|
||||
android:key="pref_key_category_visuals">
|
||||
<ListPreference
|
||||
android:title="@string/pref_title_font_size"
|
||||
android:key="pref_key_font_size"
|
||||
android:dialogTitle="@string/pref_title_font_size"
|
||||
android:entries="@array/pref_entries_font_size"
|
||||
android:entryValues="@array/pref_entry_values_font_size" />
|
||||
<CheckBoxPreference
|
||||
android:title="@string/pref_title_desktop_view"
|
||||
android:summary="@string/pref_desc_desktop_view"
|
||||
android:key="pref_key_desktop_mode"
|
||||
android:defaultValue="false"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_category_network"
|
||||
android:key="pref_key_category_network">
|
||||
<CheckBoxPreference
|
||||
android:title="@string/pref_title_load_images"
|
||||
android:key="pref_key_load_images"
|
||||
android:summary="@string/pref_desc_load_images"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:title="@string/pref_title_proxy_enabled"
|
||||
android:key="pref_key_proxy_enabled"
|
||||
android:defaultValue="false" />
|
||||
<EditTextPreference
|
||||
android:title="@string/pref_title_proxy_host"
|
||||
android:key="pref_key_proxy_host"
|
||||
android:dependency="pref_key_proxy_enabled" />
|
||||
<EditTextPreference
|
||||
android:title="@string/pref_title_proxy_port"
|
||||
android:key="pref_key_proxy_port"
|
||||
android:dependency="pref_key_proxy_enabled"
|
||||
android:inputType="number" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Loading…
Add table
Add a link
Reference in a new issue