diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 490aaf1ff8..815ce3a94e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -488,7 +488,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { private void enableSelectionMode(boolean selectionMode) { this.selectionMode = selectionMode; - ((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode); + ((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode && + AndroidUiHelper.isOrientationPortrait(getActivity())); } protected void openChangeGroupDialog(final FavoriteGroup group) { diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index e02d3da77e..e82da9bed6 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -26,6 +26,7 @@ import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; +import net.osmand.PlatformUtil; import net.osmand.data.PointDescription; import net.osmand.plus.GPXUtilities; import net.osmand.plus.GPXUtilities.GPXFile; @@ -44,6 +45,8 @@ import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.myplaces.FavoritesActivity; import net.osmand.util.Algorithms; +import org.apache.commons.logging.Log; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -54,6 +57,8 @@ import java.util.List; * Created by Denis on 18.02.2015. */ public class NotesFragment extends OsmAndListFragment { + private static final Log LOG = PlatformUtil.getLog(NotesFragment.class); + AudioVideoNotesPlugin plugin; List items; NotesAdapter listAdapter; @@ -161,7 +166,8 @@ public class NotesFragment extends OsmAndListFragment { private void enableSelectionMode(boolean selectionMode) { this.selectionMode = selectionMode; getView().findViewById(R.id.select_all).setVisibility(selectionMode? View.VISIBLE : View.GONE); - ((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode); + ((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode && + AndroidUiHelper.isOrientationPortrait(getActivity())); } private void updateSelectionTitle(ActionMode m){ @@ -271,6 +277,7 @@ public class NotesFragment extends OsmAndListFragment { @Override public boolean onCreateActionMode(final ActionMode mode, Menu menu) { + LOG.debug("onCreateActionMode"); if(type == MODE_SHARE) { listAdapter.insert(shareLocationFile, 0); } @@ -302,16 +309,19 @@ public class NotesFragment extends OsmAndListFragment { @Override public boolean onPrepareActionMode(ActionMode mode, Menu menu) { + LOG.debug("onPrepareActionMode"); return false; } @Override public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) { + LOG.debug("onActionItemClicked"); return false; } @Override public void onDestroyActionMode(ActionMode mode) { + LOG.debug("onDestroyActionMode"); if(type == MODE_SHARE) { listAdapter.remove(shareLocationFile); } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index ce3403b715..fa33ba1346 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -424,7 +424,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { private void enableSelectionMode(boolean selectionMode) { this.selectionMode = selectionMode; if (AndroidUiHelper.isOrientationPortrait(getActivity())) { - ((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode); + ((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode && + AndroidUiHelper.isOrientationPortrait(getActivity())); } } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java index 681aca4ba6..5f7328af22 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java @@ -287,7 +287,8 @@ public class OsmEditsFragment extends OsmAndListFragment private void enableSelectionMode(boolean selectionMode) { this.selectionMode = selectionMode; getView().findViewById(R.id.select_all).setVisibility(selectionMode ? View.VISIBLE : View.GONE); - ((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode); + ((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode && + AndroidUiHelper.isOrientationPortrait(getActivity())); } public OsmandActionBarActivity getActionBarActivity() {