Use switches instead of checkboxes
@@ -12,7 +12,7 @@ import android.widget.LinearLayout;
|
||||
import com.moez.QKSMS.R;
|
||||
import com.moez.QKSMS.ui.ThemeManager;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
import com.moez.QKSMS.ui.view.QKCheckBoxPreference;
|
||||
import com.moez.QKSMS.ui.view.QKSwitchPreference;
|
||||
import com.moez.QKSMS.ui.view.QKTextView;
|
||||
|
||||
public class BubblePreferenceDialog extends QKDialog {
|
||||
@@ -52,7 +52,7 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
Log.d(TAG, preference.getKey());
|
||||
switch (preference.getKey()) {
|
||||
case SettingsFragment.BUBBLES_NEW:
|
||||
ThemeManager.setBubbleStyleNew(((QKCheckBoxPreference) preference).isChecked());
|
||||
ThemeManager.setBubbleStyleNew(((QKSwitchPreference) preference).isChecked());
|
||||
in1.setBackgroundResource(ThemeManager.getReceivedBubbleRes());
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in1.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
@@ -71,7 +71,7 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
return true;
|
||||
|
||||
case SettingsFragment.COLOUR_RECEIVED:
|
||||
ThemeManager.setReceivedBubbleColored(((QKCheckBoxPreference) preference).isChecked());
|
||||
ThemeManager.setReceivedBubbleColored(((QKSwitchPreference) preference).isChecked());
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in1.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
@@ -79,7 +79,7 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
return true;
|
||||
|
||||
case SettingsFragment.COLOUR_SENT:
|
||||
ThemeManager.setSentBubbleColored(((QKCheckBoxPreference) preference).isChecked());
|
||||
ThemeManager.setSentBubbleColored(((QKSwitchPreference) preference).isChecked());
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out1.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
@@ -91,11 +91,11 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
};
|
||||
|
||||
LinearLayout prefsLayout = (LinearLayout) view.findViewById(R.id.prefs);
|
||||
prefsLayout.addView(new QKCheckBoxPreference(mContext, onPreferenceClickListener, SettingsFragment.BUBBLES_NEW,
|
||||
prefsLayout.addView(new QKSwitchPreference(mContext, onPreferenceClickListener, SettingsFragment.BUBBLES_NEW,
|
||||
prefs, true, R.string.pref_bubble_style_new, 0).getView());
|
||||
prefsLayout.addView(new QKCheckBoxPreference(mContext, onPreferenceClickListener, SettingsFragment.COLOUR_RECEIVED,
|
||||
prefsLayout.addView(new QKSwitchPreference(mContext, onPreferenceClickListener, SettingsFragment.COLOUR_RECEIVED,
|
||||
prefs, false, R.string.pref_color_received, 0).getView());
|
||||
prefsLayout.addView(new QKCheckBoxPreference(mContext, onPreferenceClickListener, SettingsFragment.COLOUR_SENT,
|
||||
prefsLayout.addView(new QKSwitchPreference(mContext, onPreferenceClickListener, SettingsFragment.COLOUR_SENT,
|
||||
prefs, true, R.string.pref_color_sent, 0).getView());
|
||||
|
||||
setTitle(R.string.pref_bubbles);
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.moez.QKSMS.common.FontManager;
|
||||
import com.moez.QKSMS.common.utils.Units;
|
||||
import com.moez.QKSMS.ui.MainActivity;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
import com.moez.QKSMS.ui.view.QKCheckBoxPreference;
|
||||
import com.moez.QKSMS.ui.view.QKSwitchPreference;
|
||||
import com.moez.QKSMS.ui.view.QKPreference;
|
||||
import com.moez.QKSMS.ui.view.QKRingtonePreference;
|
||||
import com.moez.QKSMS.ui.view.colorpicker.ColorPickerDialog;
|
||||
@@ -87,25 +87,25 @@ public class ConversationNotificationSettingsDialog extends QKDialog implements
|
||||
LinearLayout list = new LinearLayout(getActivity());
|
||||
list.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
list.addView(new QKCheckBoxPreference(getActivity(), this, SettingsFragment.NOTIFICATION_LED,
|
||||
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_LED,
|
||||
mConversationPrefs.getConversationPrefs(), mConversationPrefs.getNotificationLedEnabled(), R.string.pref_led, 0).getView());
|
||||
|
||||
list.addView(new QKPreference(getActivity(), this, SettingsFragment.NOTIFICATION_LED_COLOR,
|
||||
R.string.pref_theme_led, 0).getView());
|
||||
|
||||
list.addView(new QKCheckBoxPreference(getActivity(), this, SettingsFragment.WAKE,
|
||||
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.WAKE,
|
||||
mConversationPrefs.getConversationPrefs(), mConversationPrefs.getWakePhoneEnabled(), R.string.pref_wake, R.string.pref_wake_summary).getView());
|
||||
|
||||
list.addView(new QKCheckBoxPreference(getActivity(), this, SettingsFragment.NOTIFICATION_TICKER,
|
||||
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_TICKER,
|
||||
mConversationPrefs.getConversationPrefs(), mConversationPrefs.getTickerEnabled(), R.string.pref_ticker, R.string.pref_ticker_summary).getView());
|
||||
|
||||
list.addView(new QKCheckBoxPreference(getActivity(), this, SettingsFragment.NOTIFICATION_VIBRATE,
|
||||
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_VIBRATE,
|
||||
mConversationPrefs.getConversationPrefs(), mConversationPrefs.getVibrateEnabled(), R.string.pref_vibration, R.string.pref_vibration_summary).getView());
|
||||
|
||||
list.addView(new QKRingtonePreference(getActivity(), this, SettingsFragment.NOTIFICATION_TONE,
|
||||
R.string.pref_ringtone, R.string.pref_ringtone_summary).getView());
|
||||
|
||||
list.addView(new QKCheckBoxPreference(getActivity(), this, SettingsFragment.NOTIFICATION_CALL_BUTTON,
|
||||
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_CALL_BUTTON,
|
||||
mConversationPrefs.getConversationPrefs(), mConversationPrefs.getCallButtonEnabled(), R.string.pref_notification_call, R.string.pref_notification_call_summary).getView());
|
||||
|
||||
setCustomView(list);
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
package com.moez.QKSMS.ui.view;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.moez.QKSMS.interfaces.LiveView;
|
||||
import com.moez.QKSMS.common.LiveViewManager;
|
||||
import com.moez.QKSMS.ui.ThemeManager;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
|
||||
public class QKCheckBox extends android.widget.CheckBox implements LiveView {
|
||||
public static final String TAG = "QKCheckBox";
|
||||
|
||||
private static final int ALPHA_ENABLED = 255;
|
||||
private static final int ALPHA_DISABLED = 128;
|
||||
|
||||
private static final int ANIMATION_FRAME_START = 0;
|
||||
private static final int ANIMATION_FRAME_COMPLETE = 15;
|
||||
|
||||
private static final int ANIMATION_DURATION = 200; // ms
|
||||
|
||||
private Drawable mButtonDrawable;
|
||||
|
||||
public QKCheckBox(Context context) { this(context, null); }
|
||||
public QKCheckBox(Context context, AttributeSet attrs) { this(context, attrs, android.R.attr.checkboxStyle); }
|
||||
public QKCheckBox(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setDrawable(ANIMATION_FRAME_COMPLETE);
|
||||
|
||||
// This disables an annoying double ripple effect on Lollipop+ android versions.
|
||||
// But, we can't just always disable the background, because that makes the CheckBox
|
||||
// invisible for older Android versions (i.e. 4.1.2, perhaps older)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
setBackground(null);
|
||||
}
|
||||
|
||||
// Register this view for live updates.
|
||||
LiveViewManager.registerView(this);
|
||||
LiveViewManager.registerPreference(this, SettingsFragment.THEME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the button drawable, updating the color of it according to the theme color.
|
||||
* @param drawable
|
||||
*/
|
||||
@Override
|
||||
public void setButtonDrawable(Drawable drawable) {
|
||||
mButtonDrawable = drawable;
|
||||
mButtonDrawable.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
super.setButtonDrawable(drawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
// Refresh the button drawable with the new theme color.
|
||||
setButtonDrawable(mButtonDrawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChecked(boolean checked) {
|
||||
boolean animate = checked != isChecked();
|
||||
super.setChecked(checked);
|
||||
|
||||
if (animate) {
|
||||
ObjectAnimator checkBoxAnimator = ObjectAnimator.ofInt(
|
||||
this, "drawable", ANIMATION_FRAME_START, ANIMATION_FRAME_COMPLETE
|
||||
);
|
||||
checkBoxAnimator.setDuration(ANIMATION_DURATION);
|
||||
checkBoxAnimator.start();
|
||||
}
|
||||
}
|
||||
|
||||
private void setDrawable(int number) {
|
||||
// TODO: Preload the drawables as constants instead of loading them this way? Might be faster
|
||||
|
||||
Resources res = getContext().getResources();
|
||||
// i.e. btn_check_to_off_mtrl_003, or btn_check_to_on_mtrl_013.
|
||||
// the "%03d" part just means "insert this number, padding it so that it's always three
|
||||
// digits"
|
||||
String name = String.format("btn_check_to_%s_mtrl_%03d", isChecked() ? "on" : "off", number);
|
||||
int id = res.getIdentifier(name, "drawable", getContext().getPackageName());
|
||||
|
||||
try {
|
||||
setButtonDrawable(ContextCompat.getDrawable(getContext(), id));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
mButtonDrawable.mutate().setAlpha(isEnabled() ? ALPHA_ENABLED : ALPHA_DISABLED);
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.moez.QKSMS.ui.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.util.AttributeSet;
|
||||
import com.moez.QKSMS.common.LiveViewManager;
|
||||
import com.moez.QKSMS.interfaces.LiveView;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
|
||||
public class QKSwitch extends SwitchCompat implements LiveView {
|
||||
|
||||
public QKSwitch(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public QKSwitch(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
// Register this view for live updates.
|
||||
LiveViewManager.registerView(this);
|
||||
LiveViewManager.registerPreference(this, SettingsFragment.THEME);
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
//getThumbDrawable().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
//getTrackDrawable().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChecked(boolean checked) {
|
||||
super.setChecked(checked);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.moez.QKSMS.ui.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.SwitchPreference;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -12,15 +12,15 @@ import com.moez.QKSMS.R;
|
||||
* Regular android preferences don't have basic functionality when you manually add them to views
|
||||
* other than preferencegroups, this just cleans up some boilerplate code to set ours up
|
||||
*/
|
||||
public class QKCheckBoxPreference extends CheckBoxPreference {
|
||||
public class QKSwitchPreference extends SwitchPreference {
|
||||
|
||||
private SharedPreferences mPrefs;
|
||||
private OnPreferenceClickListener mOnPreferenceClickListener;
|
||||
private boolean mDefaultValue;
|
||||
private QKCheckBox mCheckBox;
|
||||
private QKSwitch mCheckBox;
|
||||
|
||||
public QKCheckBoxPreference(Context context, OnPreferenceClickListener onPreferenceClickListener,
|
||||
String key, SharedPreferences prefs, boolean defaultValue, int title, int summary) {
|
||||
public QKSwitchPreference(Context context, OnPreferenceClickListener onPreferenceClickListener,
|
||||
String key, SharedPreferences prefs, boolean defaultValue, int title, int summary) {
|
||||
super(context);
|
||||
mPrefs = prefs;
|
||||
mOnPreferenceClickListener = onPreferenceClickListener;
|
||||
@@ -29,7 +29,7 @@ public class QKCheckBoxPreference extends CheckBoxPreference {
|
||||
setEnabled(true);
|
||||
mDefaultValue = prefs.getBoolean(key, defaultValue);
|
||||
setLayoutResource(R.layout.list_item_preference);
|
||||
setWidgetLayoutResource(R.layout.view_checkbox);
|
||||
setWidgetLayoutResource(R.layout.view_switch);
|
||||
if (title != 0) setTitle(title);
|
||||
if (summary != 0) setSummary(summary);
|
||||
}
|
||||
@@ -45,17 +45,14 @@ public class QKCheckBoxPreference extends CheckBoxPreference {
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
|
||||
mCheckBox = (QKCheckBox) view.findViewById(android.R.id.checkbox);
|
||||
mCheckBox = (QKSwitch) view.findViewById(android.R.id.checkbox);
|
||||
mCheckBox.setChecked(mDefaultValue);
|
||||
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mPrefs.edit().putBoolean(getKey(), !mCheckBox.isChecked()).apply();
|
||||
mCheckBox.setChecked(!mCheckBox.isChecked());
|
||||
if (mOnPreferenceClickListener != null) {
|
||||
mOnPreferenceClickListener.onPreferenceClick(QKCheckBoxPreference.this);
|
||||
}
|
||||
view.setOnClickListener(v -> {
|
||||
mPrefs.edit().putBoolean(getKey(), !mCheckBox.isChecked()).apply();
|
||||
mCheckBox.setChecked(!mCheckBox.isChecked());
|
||||
if (mOnPreferenceClickListener != null) {
|
||||
mOnPreferenceClickListener.onPreferenceClick(QKSwitchPreference.this);
|
||||
}
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 881 B |
|
Before Width: | Height: | Size: 803 B |
|
Before Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 728 B |
|
Before Width: | Height: | Size: 929 B |
|
Before Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 728 B |
|
Before Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 776 B |
|
Before Width: | Height: | Size: 902 B |
|
Before Width: | Height: | Size: 686 B |
|
Before Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 559 B |
|
Before Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,4 +1,4 @@
|
||||
<com.moez.QKSMS.ui.view.QKCheckBox
|
||||
<com.moez.QKSMS.ui.view.QKSwitch
|
||||
android:id="@android:id/checkbox"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -40,7 +40,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_night_auto_summary"
|
||||
android:title="@string/pref_night_auto"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<Preference
|
||||
android:defaultValue="6:00"
|
||||
android:dependency="pref_key_night_auto"
|
||||
@@ -64,13 +64,13 @@
|
||||
android:key="pref_key_status_tint"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_status_tint"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_navigation_tint"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_navigation_tint"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -108,21 +108,21 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_hide_avatar_conversations_summary"
|
||||
android:title="@string/pref_hide_avatar_conversations"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_hide_avatar_sent"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_hide_avatar_sent_summary"
|
||||
android:title="@string/pref_hide_avatar_sent"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_hide_avatar_received"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_hide_avatar_received_summary"
|
||||
android:title="@string/pref_hide_avatar_received"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -134,20 +134,20 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_message_count_summary"
|
||||
android:title="@string/pref_message_count"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_sliding_tab"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_sliding_tab_summary"
|
||||
android:title="@string/pref_sliding_tab"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_24h"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_24h_summary"
|
||||
android:title="@string/pref_24h"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -10,7 +10,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_delayed_summary"
|
||||
android:title="@string/pref_delayed"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="3"
|
||||
android:dependency="pref_key_delayed"
|
||||
@@ -29,7 +29,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_delivery_summary"
|
||||
android:title="@string/pref_delivery"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_key_delivery"
|
||||
@@ -37,7 +37,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_delivery_toast_summary"
|
||||
android:title="@string/pref_delivery_toast"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_key_delivery"
|
||||
@@ -45,7 +45,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_delivery_vibrate_summary"
|
||||
android:title="@string/pref_delivery_vibrate"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/list_item_preference_category"
|
||||
@@ -56,35 +56,35 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_auto_emoji_summary"
|
||||
android:title="@string/pref_auto_emoji"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_markdown_enabled"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_markdown_enabled_summary"
|
||||
android:title="@string/pref_markdown_enabled"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_strip_unicode"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_strip_unicode_summary"
|
||||
android:title="@string/pref_strip_unicode"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_split"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_split_summary"
|
||||
android:title="@string/pref_split"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_split_counter"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_split_counter_summary"
|
||||
android:title="@string/pref_split_counter"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/list_item_preference_category"
|
||||
@@ -95,7 +95,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_blocked_conversations_summary"
|
||||
android:title="@string/pref_blocked_conversations"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<Preference
|
||||
android:defaultValue="false"
|
||||
android:dependency="pref_key_blocked_enabled"
|
||||
@@ -109,7 +109,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_mobile_only_summary"
|
||||
android:title="@string/pref_mobile_only"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/enter_button_options"
|
||||
@@ -124,14 +124,14 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_compose_summary_favorites"
|
||||
android:title="@string/pref_compose_favorites"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_prox_sensor_calling"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_prox_sensor_call_summary"
|
||||
android:title="@string/pref_prox_sensor_call"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<Preference
|
||||
android:key="pref_key_qk_responses"
|
||||
android:layout="@layout/list_item_preference"
|
||||
@@ -143,6 +143,6 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_endlessjabber_summary"
|
||||
android:title="@string/pref_yappy"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -11,21 +11,21 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_compose_group_summary"
|
||||
android:title="@string/pref_compose_group"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<!--<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_auto_download"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_auto_download_summary"
|
||||
android:title="@string/pref_auto_download"
|
||||
android:widgetLayout="@layout/view_checkbox" />-->
|
||||
android:widgetLayout="@layout/view_switch" />-->
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_auto_data"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_auto_data_summary"
|
||||
android:title="@string/pref_auto_data"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/list_item_preference_category"
|
||||
android:title="@string/pref_category_sending_mms">
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_long_as_mms_summary"
|
||||
android:title="@string/pref_long_as_mms"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="3"
|
||||
android:dependency="pref_key_long_as_mms"
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
android:key="pref_key_notifications"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_notifications"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_key_notifications"
|
||||
android:key="pref_key_led"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_led"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<Preference
|
||||
android:defaultValue="-48060"
|
||||
android:dependency="pref_key_led"
|
||||
@@ -30,7 +30,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_wake_summary"
|
||||
android:title="@string/pref_wake"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="@bool/preL"
|
||||
android:dependency="pref_key_notifications"
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_ticker_summary"
|
||||
android:title="@string/pref_ticker"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/notification_private_options"
|
||||
@@ -54,7 +54,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_vibration_summary"
|
||||
android:title="@string/pref_vibration"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<RingtonePreference
|
||||
android:defaultValue="content://settings/system/notification_sound"
|
||||
android:dependency="pref_key_notifications"
|
||||
@@ -70,7 +70,7 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_notification_call_summary"
|
||||
android:title="@string/pref_notification_call"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="pref_key_notifications"
|
||||
@@ -78,6 +78,6 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_dismiss_read_summary"
|
||||
android:title="@string/pref_dimiss_read"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -10,6 +10,6 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_quickcompose_summary"
|
||||
android:title="@string/pref_quickcompose"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -10,13 +10,13 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_quickreply_enabled_summary"
|
||||
android:title="@string/pref_quickreply_enabled"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_quickreply_dismiss"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_tap_to_quit_summary"
|
||||
android:title="@string/pref_tap_to_quit"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -34,21 +34,21 @@
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_markdown_enabled_summary"
|
||||
android:title="@string/pref_markdown_enabled"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_delivery"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_delivery_summary"
|
||||
android:title="@string/pref_delivery"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pref_key_compose_group"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:summary="@string/pref_compose_group_summary"
|
||||
android:title="@string/pref_compose_group"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -59,14 +59,14 @@
|
||||
android:key="pref_key_notifications"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_notifications"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_key_notifications"
|
||||
android:key="pref_key_led"
|
||||
android:layout="@layout/list_item_preference"
|
||||
android:title="@string/pref_led"
|
||||
android:widgetLayout="@layout/view_checkbox" />
|
||||
android:widgetLayout="@layout/view_switch" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
||||