remove our swipe to select/deselect code now that we have long-press to select and check box to select
This commit is contained in:
parent
7ac34b185c
commit
cd98875729
1 changed files with 1 additions and 33 deletions
|
@ -59,8 +59,6 @@ import com.fsck.k9.K9;
|
|||
import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.R;
|
||||
import com.fsck.k9.SearchSpecification;
|
||||
import com.fsck.k9.activity.misc.SwipeGestureDetector;
|
||||
import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener;
|
||||
import com.fsck.k9.activity.setup.AccountSettings;
|
||||
import com.fsck.k9.activity.setup.FolderSettings;
|
||||
import com.fsck.k9.activity.setup.Prefs;
|
||||
|
@ -82,8 +80,7 @@ import com.fsck.k9.mail.store.StorageManager;
|
|||
* shows a list of messages.
|
||||
* From this Activity the user can perform all standard message operations.
|
||||
*/
|
||||
public class MessageList extends K9ListActivity implements OnItemClickListener,
|
||||
OnSwipeGestureListener {
|
||||
public class MessageList extends K9ListActivity implements OnItemClickListener {
|
||||
|
||||
/**
|
||||
* Reverses the result of a {@link Comparator}.
|
||||
|
@ -698,9 +695,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||
initializeMessageList(getIntent(), true);
|
||||
getListView().setVerticalFadingEdgeEnabled(false);
|
||||
|
||||
// Enable gesture detection for MessageLists
|
||||
mGestureDetector = new GestureDetector(new SwipeGestureDetector(this, this));
|
||||
|
||||
// Enable context action bar behaviour
|
||||
getListView().setOnItemLongClickListener(new OnItemLongClickListener() {
|
||||
@Override
|
||||
|
@ -1607,32 +1601,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSwipeRightToLeft(final MotionEvent e1, final MotionEvent e2) {
|
||||
// Handle right-to-left as an un-select
|
||||
handleSwipe(e1, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSwipeLeftToRight(final MotionEvent e1, final MotionEvent e2) {
|
||||
// Handle left-to-right as a select.
|
||||
handleSwipe(e1, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a select or unselect swipe event
|
||||
* @param downMotion Event that started the swipe
|
||||
* @param selected true if this was an attempt to select (i.e. left to right).
|
||||
*/
|
||||
private void handleSwipe(final MotionEvent downMotion, final boolean selected) {
|
||||
int[] listPosition = new int[2];
|
||||
mListView.getLocationOnScreen(listPosition);
|
||||
int position = mListView.pointToPosition((int) downMotion.getRawX() - listPosition[0], (int) downMotion.getRawY() - listPosition[1]);
|
||||
if (position != AdapterView.INVALID_POSITION) {
|
||||
handleContextRelatedClick(position);
|
||||
}
|
||||
}
|
||||
|
||||
class MessageListAdapter extends BaseAdapter {
|
||||
private final List<MessageInfoHolder> mMessages =
|
||||
Collections.synchronizedList(new ArrayList<MessageInfoHolder>());
|
||||
|
|
Loading…
Reference in a new issue