diff --git a/android/res/layout-w1020dp/menu_buttons_line.xml b/android/res/layout-w1020dp/menu_buttons_line.xml deleted file mode 100644 index d026d5a110..0000000000 --- a/android/res/layout-w1020dp/menu_buttons_line.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/res/layout-w416dp/menu_content.xml b/android/res/layout-w416dp/menu_content.xml deleted file mode 100644 index 168a40767f..0000000000 --- a/android/res/layout-w416dp/menu_content.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index a2cf9d6e98..e7614e6e24 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -850,12 +850,6 @@ public class MwmActivity extends BaseMwmFragmentActivity }); } - private void toggleMenu() - { - getCurrentMenu().toggle(true); - refreshFade(); - } - public void refreshFade() { if (getCurrentMenu().isOpen()) @@ -2665,17 +2659,13 @@ public class MwmActivity extends BaseMwmFragmentActivity @Override public void onMenuItemClickInternal() { - if (!getActivity().mMainMenu.isOpen()) - { - Statistics.INSTANCE.trackToolbarClick(getItem()); - // TODO: - if (/*getActivity().mPlacePage.isDocked() &&*/ getActivity().closePlacePage()) - return; + Statistics.INSTANCE.trackToolbarClick(getItem()); + if (getActivity().closePlacePage()) + return; + if (getActivity().closeSidePanel()) + return; - if (getActivity().closeSidePanel()) - return; - } - getActivity().toggleMenu(); + Toast.makeText(getActivity(), "Open bottom sheet menu!", Toast.LENGTH_SHORT).show(); } } diff --git a/android/src/com/mapswithme/maps/widget/menu/MainMenu.java b/android/src/com/mapswithme/maps/widget/menu/MainMenu.java index 7888d086ae..dbfaa0fda7 100644 --- a/android/src/com/mapswithme/maps/widget/menu/MainMenu.java +++ b/android/src/com/mapswithme/maps/widget/menu/MainMenu.java @@ -15,7 +15,6 @@ import com.mapswithme.util.UiUtils; import com.mapswithme.util.statistics.StatisticValueConverter; import java.util.Locale; -import java.util.Optional; public class MainMenu extends BaseMenu { @@ -26,7 +25,7 @@ public class MainMenu extends BaseMenu @Override boolean showToggle() { - return false; + return true; } }, NAVIGATION, diff --git a/android/src/com/mapswithme/maps/widget/menu/MenuToggle.java b/android/src/com/mapswithme/maps/widget/menu/MenuToggle.java index d034214a62..f4dad13079 100644 --- a/android/src/com/mapswithme/maps/widget/menu/MenuToggle.java +++ b/android/src/com/mapswithme/maps/widget/menu/MenuToggle.java @@ -16,8 +16,6 @@ import com.mapswithme.util.UiUtils; class MenuToggle { private final ImageView mButton; - private final boolean mAlwaysShow; - private final TransitionDrawable mOpenImage; private final TransitionDrawable mCollapseImage; @@ -29,7 +27,6 @@ class MenuToggle private MenuToggle(View frame, @DimenRes int heightRes, @DrawableRes int src, @DrawableRes int dst) { mButton = (ImageView) frame.findViewById(R.id.toggle); - mAlwaysShow = (frame.findViewById(R.id.disable_toggle) == null); int sz = UiUtils.dimen(heightRes); Rect bounds = new Rect(0, 0, sz, sz); @@ -67,10 +64,7 @@ class MenuToggle void show(boolean show) { - //TODO: refactor mAlwaysShow logic, because now we shouldn't display - // the toggle button when we are in prepare routing state (create JIRA item for that) - // A temporary solution is the hide() method. - UiUtils.showIf(mAlwaysShow || show, mButton); + UiUtils.showIf(show, mButton); } void hide() @@ -82,9 +76,4 @@ class MenuToggle { transitImage(mOpenImage, open, animate); } - - void setCollapsed(boolean collapse, boolean animate) - { - transitImage(mCollapseImage, collapse, animate); - } }