diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-09-04 20:11:56 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-09-04 20:11:56 +0200 |
commit | 88cfe71f75eae5726924b2cb36766140dec5f143 (patch) | |
tree | e63a3bc3236ce4fbe46cbfed2bb15bde3bb0f1b5 /src/de/danoeh/antennapod/fragment | |
parent | 196f5407ce16d888bafae70788b60a8edf5ac27b (diff) | |
download | AntennaPod-88cfe71f75eae5726924b2cb36766140dec5f143.zip |
Added workaround for ActionMode bug
https://code.google.com/p/android/issues/detail?id=58321
Diffstat (limited to 'src/de/danoeh/antennapod/fragment')
-rw-r--r-- | src/de/danoeh/antennapod/fragment/FeedlistFragment.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/de/danoeh/antennapod/fragment/FeedlistFragment.java b/src/de/danoeh/antennapod/fragment/FeedlistFragment.java index 0dc29c415..6283a4b7f 100644 --- a/src/de/danoeh/antennapod/fragment/FeedlistFragment.java +++ b/src/de/danoeh/antennapod/fragment/FeedlistFragment.java @@ -1,7 +1,5 @@ package de.danoeh.antennapod.fragment; -import java.util.List; - import android.annotation.SuppressLint; import android.content.Context; import android.content.DialogInterface; @@ -14,7 +12,6 @@ import android.support.v7.view.ActionMode; import android.util.Log; import android.view.*; import android.widget.*; - import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.FeedItemlistActivity; @@ -29,6 +26,8 @@ import de.danoeh.antennapod.storage.DownloadRequestException; import de.danoeh.antennapod.storage.FeedItemStatistics; import de.danoeh.antennapod.util.menuhandler.FeedMenuHandler; +import java.util.List; + public class FeedlistFragment extends Fragment implements ActionMode.Callback, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener { @@ -244,11 +243,18 @@ public class FeedlistFragment extends Fragment implements return true; } + private boolean actionModeDestroyWorkaround = false; // TODO remove this workaround + @Override public void onDestroyActionMode(ActionMode mode) { - mActionMode = null; - selectedFeed = null; - fla.setSelectedItemIndex(FeedlistAdapter.SELECTION_NONE); + if (actionModeDestroyWorkaround) { + mActionMode = null; + selectedFeed = null; + fla.setSelectedItemIndex(FeedlistAdapter.SELECTION_NONE); + actionModeDestroyWorkaround = false; + } else { + actionModeDestroyWorkaround = true; + } } @Override |