diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/BubblePreferenceDialog.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/BubblePreferenceDialog.java index 9167a0cc..3fd9fc68 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/BubblePreferenceDialog.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/BubblePreferenceDialog.java @@ -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); diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/ConversationNotificationSettingsDialog.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/ConversationNotificationSettingsDialog.java index 012a4bfa..e1266fd2 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/ConversationNotificationSettingsDialog.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/dialog/ConversationNotificationSettingsDialog.java @@ -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); diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBox.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBox.java deleted file mode 100644 index 64a0c05a..00000000 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBox.java +++ /dev/null @@ -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); - } -} diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitch.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitch.java new file mode 100644 index 00000000..67031f16 --- /dev/null +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitch.java @@ -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); + } +} \ No newline at end of file diff --git a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBoxPreference.java b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitchPreference.java similarity index 62% rename from QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBoxPreference.java rename to QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitchPreference.java index ae6054c3..976fa8c9 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKCheckBoxPreference.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/ui/view/QKSwitchPreference.java @@ -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); } }); diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_000.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_000.png deleted file mode 100644 index 71682635..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_000.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_001.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_001.png deleted file mode 100644 index b203c727..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_001.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_002.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_002.png deleted file mode 100644 index 6bb58907..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_002.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_003.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_003.png deleted file mode 100644 index 780b1eb4..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_003.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_004.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_004.png deleted file mode 100644 index 9b43cad2..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_004.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_005.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_005.png deleted file mode 100644 index cdadd876..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_005.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_006.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_006.png deleted file mode 100644 index 98c6696e..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_006.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_007.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_007.png deleted file mode 100644 index 310761a8..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_007.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_008.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_008.png deleted file mode 100644 index e264b7f5..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_008.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_009.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_009.png deleted file mode 100644 index ffbf3fcd..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_009.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_010.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_010.png deleted file mode 100644 index 51fab10e..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_010.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_011.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_011.png deleted file mode 100644 index e305e7a2..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_011.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_012.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_012.png deleted file mode 100644 index 8fd1d1ab..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_012.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_013.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_013.png deleted file mode 100644 index aff761d1..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_013.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_014.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_014.png deleted file mode 100644 index a8a8836f..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_014.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_015.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_015.png deleted file mode 100644 index 469c50f2..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_off_mtrl_015.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png deleted file mode 100644 index 469c50f2..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_001.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_001.png deleted file mode 100644 index f0dba58d..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_001.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_002.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_002.png deleted file mode 100644 index c157990a..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_002.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_003.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_003.png deleted file mode 100644 index 3bf482fe..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_003.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_004.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_004.png deleted file mode 100644 index 66027b4f..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_004.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_005.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_005.png deleted file mode 100644 index 0a429111..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_005.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_006.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_006.png deleted file mode 100644 index 94182038..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_006.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_007.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_007.png deleted file mode 100644 index c3f6df2c..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_007.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_008.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_008.png deleted file mode 100644 index 30fc52fb..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_008.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_009.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_009.png deleted file mode 100644 index 4262a97f..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_009.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_010.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_010.png deleted file mode 100644 index b2fd7393..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_010.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_011.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_011.png deleted file mode 100644 index 42e2669c..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_011.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_012.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_012.png deleted file mode 100644 index 941f5f48..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_012.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_013.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_013.png deleted file mode 100644 index f06412f4..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_013.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_014.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_014.png deleted file mode 100644 index 35c4c12c..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_014.png and /dev/null differ diff --git a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png b/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png deleted file mode 100644 index 71682635..00000000 Binary files a/QKSMS/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png and /dev/null differ diff --git a/QKSMS/src/main/res/layout/view_checkbox.xml b/QKSMS/src/main/res/layout/view_switch.xml similarity index 87% rename from QKSMS/src/main/res/layout/view_checkbox.xml rename to QKSMS/src/main/res/layout/view_switch.xml index d1b2fb88..0751571c 100644 --- a/QKSMS/src/main/res/layout/view_checkbox.xml +++ b/QKSMS/src/main/res/layout/view_switch.xml @@ -1,4 +1,4 @@ - + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> \ No newline at end of file diff --git a/QKSMS/src/main/res/xml/settings_general.xml b/QKSMS/src/main/res/xml/settings_general.xml index a65ceac4..166af425 100644 --- a/QKSMS/src/main/res/xml/settings_general.xml +++ b/QKSMS/src/main/res/xml/settings_general.xml @@ -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" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> \ No newline at end of file diff --git a/QKSMS/src/main/res/xml/settings_mms.xml b/QKSMS/src/main/res/xml/settings_mms.xml index bce15742..cc7cde04 100644 --- a/QKSMS/src/main/res/xml/settings_mms.xml +++ b/QKSMS/src/main/res/xml/settings_mms.xml @@ -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" /> + android:widgetLayout="@layout/view_switch" />--> + android:widgetLayout="@layout/view_switch" /> @@ -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" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> \ No newline at end of file diff --git a/QKSMS/src/main/res/xml/settings_quickcompose.xml b/QKSMS/src/main/res/xml/settings_quickcompose.xml index dd57d2e0..6c7959a2 100644 --- a/QKSMS/src/main/res/xml/settings_quickcompose.xml +++ b/QKSMS/src/main/res/xml/settings_quickcompose.xml @@ -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" /> \ No newline at end of file diff --git a/QKSMS/src/main/res/xml/settings_quickreply.xml b/QKSMS/src/main/res/xml/settings_quickreply.xml index d93b43a5..ad18c213 100644 --- a/QKSMS/src/main/res/xml/settings_quickreply.xml +++ b/QKSMS/src/main/res/xml/settings_quickreply.xml @@ -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" /> + android:widgetLayout="@layout/view_switch" /> \ No newline at end of file diff --git a/QKSMS/src/main/res/xml/settings_simple.xml b/QKSMS/src/main/res/xml/settings_simple.xml index e2f1b2a4..542ec1d1 100644 --- a/QKSMS/src/main/res/xml/settings_simple.xml +++ b/QKSMS/src/main/res/xml/settings_simple.xml @@ -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" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" /> + android:widgetLayout="@layout/view_switch" />