Add switch view to all appropriate preferences

This commit is contained in:
Moez Bhatti
2017-12-04 00:47:20 -05:00
parent eaaadcd3fb
commit 64504a2433
4 changed files with 87 additions and 1 deletions
@@ -32,6 +32,7 @@
<FrameLayout
android:id="@+id/widgetFrame"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:layout_marginRight="16dp" />
</merge>
@@ -34,6 +34,74 @@
android:layout_height="wrap_content"
app:title="@string/settings_theme_title" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/dark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_dark_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/autoEmoji"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_auto_emoji_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_notifications_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/vibration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_vibration_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/ringtone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_ringtone_title" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/delivery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_delivery_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/split"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_split_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/unicode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_unicode_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/mms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_mms_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/mmsSize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_mms_size_title" />
<com.moez.QKSMS.presentation.view.PreferenceView
android:id="@+id/sync"
android:layout_width="match_parent"
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.SwitchCompat android:id="@+id/checkbox"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false" />
+10
View File
@@ -19,6 +19,16 @@
<string name="settings_default_sms_summary_true">QKSMS is your default SMS app</string>
<string name="settings_default_sms_summary_false">Set QKSMS as your default SMS app</string>
<string name="settings_theme_title">Theme</string>
<string name="settings_dark_title">Dark mode</string>
<string name="settings_auto_emoji_title">Automatic emoji</string>
<string name="settings_notifications_title">Notifications</string>
<string name="settings_vibration_title">Vibration</string>
<string name="settings_ringtone_title">Ringtone</string>
<string name="settings_delivery_title">Delivery confirmations</string>
<string name="settings_split_title">Split long SMS</string>
<string name="settings_unicode_title">Strip unicode</string>
<string name="settings_mms_title">MMS enabled</string>
<string name="settings_mms_size_title">Max MMS attachment size</string>
<string name="settings_sync_title">Sync messages</string>
<string name="settings_sync_summary">Re-sync your messages with the native Android SMS database</string>