Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Marchuk <alexm@maps.me>2015-09-03 12:21:46 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:03:42 +0300
commit47028a436cb0df19a881180a5387d64b25538117 (patch)
treecd7a2849fe58a4ec4d74ad021a929adb7ec15596 /android
parent9f0077e90d0bd22731a9a8c36fe0d631349609f0 (diff)
[android] fix: Hide collapsed menu buttons.
Diffstat (limited to 'android')
-rw-r--r--android/res/layout/menu_buttons_line.xml4
-rw-r--r--android/src/com/mapswithme/maps/widget/menu/MainMenu.java12
2 files changed, 13 insertions, 3 deletions
diff --git a/android/res/layout/menu_buttons_line.xml b/android/res/layout/menu_buttons_line.xml
index ade205d01e..4500e376de 100644
--- a/android/res/layout/menu_buttons_line.xml
+++ b/android/res/layout/menu_buttons_line.xml
@@ -24,7 +24,7 @@
android:layout_height="match_parent"
android:layout_weight="1"/>
- <ImageView android:id="@+id/route"
+ <!--ImageView android:id="@+id/route"
style="@style/MwmTheme.Menu.Line.Button"
android:src="@drawable/ic_menu_point_to_point"
android:visibility="gone"
@@ -35,7 +35,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:visibility="gone"
- tools:visibility="visible"/>
+ tools:visibility="visible"/ -->
<ImageView android:id="@+id/bookmarks"
style="@style/MwmTheme.Menu.Line.Button"
diff --git a/android/src/com/mapswithme/maps/widget/menu/MainMenu.java b/android/src/com/mapswithme/maps/widget/menu/MainMenu.java
index 73d3f9e8a0..dd2e7e8ede 100644
--- a/android/src/com/mapswithme/maps/widget/menu/MainMenu.java
+++ b/android/src/com/mapswithme/maps/widget/menu/MainMenu.java
@@ -74,8 +74,11 @@ public class MainMenu
@Override
public void onTrackStarted(boolean collapsed)
{
- for (View v: mCollapseViews)
+ for (View v : mCollapseViews)
{
+ if (collapsed)
+ UiUtils.show(v);
+
v.setAlpha(collapsed ? 0.0f : 1.0f);
v.animate()
.alpha(collapsed ? 1.0f : 0.0f)
@@ -92,6 +95,10 @@ public class MainMenu
{
mCollapsed = collapsed;
updateMarker();
+
+ if (collapsed)
+ for (View v : mCollapseViews)
+ UiUtils.hide(v);
}
@Override
@@ -260,7 +267,10 @@ public class MainMenu
private void adjustCollapsedItems()
{
for (View v: mCollapseViews)
+ {
+ UiUtils.showIf(!mCollapsed, v);
v.setAlpha(mCollapsed ? 0.0f : 1.0f);
+ }
if (mAnimationSymmetricalGap == null)
return;