Messaging: Implement option for swipe right to delete.

Squashed commit of the following:

Author: Adnan Begovic <adnan@cyngn.com>
Date:   Thu Jan 14 17:20:43 2016 -0800
Messaging: Implement option for swipe to delete.

  No one wants to swipe to archive, that's stupid.

Change-Id: Ia8f0fc675582ef343311e60b755e284322f25102

Author: chengzhi.hou <chengzhi.hou@ck-telecom.com>
Date:   Wed Feb 24 20:01:17 2016 +0800
Messaging: Swipe right to delete conversation

Change "swipe delete" to "swipe right delete", so SwipeArchive and SwipeDelete
can exist at the same time.

Change-Id: Id66167c2e749f8ab0ee917e0138027c7404b8c90

Author: Michael Bestas <mikeioannina@cyanogenmod.org>
Date:   Tue Mar 1 02:27:16 2016 +0200
Improve swipe to delete strings

Change-Id: I180d09a6680084d9fd87c6dafd56db18ca5a580a

Author: Joey Rizzoli <joey@cyanogenmoditalia.it>
Date:   Mon Oct 17 16:32:25 2016 +0200
Messaging: show snackbar instead of toast when deleting conversation

more consistency with archive action

Change-Id: I06129850860a2a51c10ade65fb87c9f37a0c2bfa
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>

Change-Id: Ia8f0fc675582ef343311e60b755e284322f25102
This commit is contained in:
Adnan Begovic
2016-01-14 17:20:43 -08:00
committed by Michael Bestas
parent 950286f001
commit 086bb5c3f5
12 changed files with 152 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.preference.RingtonePreference;
import android.preference.SwitchPreference;
import android.preference.TwoStatePreference;
import android.provider.Settings;
import androidx.core.app.NavUtils;
@@ -97,6 +98,8 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity {
private String mSmsEnabledPrefKey;
private Preference mSmsEnabledPreference;
private boolean mIsSmsPreferenceClicked;
private String mSwipeRightToDeleteConversationkey;
private SwitchPreference mSwipeRightToDeleteConversationPreference;
public ApplicationSettingsFragment() {
// Required empty constructor
@@ -121,6 +124,10 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity {
mSmsDisabledPreference = findPreference(mSmsDisabledPrefKey);
mSmsEnabledPrefKey = getString(R.string.sms_enabled_pref_key);
mSmsEnabledPreference = findPreference(mSmsEnabledPrefKey);
mSwipeRightToDeleteConversationkey = getString(
R.string.swipe_right_deletes_conversation_key);
mSwipeRightToDeleteConversationPreference =
(SwitchPreference) findPreference(mSwipeRightToDeleteConversationkey);
mIsSmsPreferenceClicked = false;
final SharedPreferences prefs = getPreferenceScreen().getSharedPreferences();