From 4e651f816423d6b83292c63bbf6f07aa23d714db Mon Sep 17 00:00:00 2001 From: crimean Date: Sat, 6 Jul 2019 22:36:29 +0300 Subject: [PATCH] Fix context menu crash --- OsmAnd/res/layout/context_menu_buttons.xml | 57 ++++--------------- .../MapContextMenuFragment.java | 4 +- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/OsmAnd/res/layout/context_menu_buttons.xml b/OsmAnd/res/layout/context_menu_buttons.xml index 6658418a97..25352b077a 100644 --- a/OsmAnd/res/layout/context_menu_buttons.xml +++ b/OsmAnd/res/layout/context_menu_buttons.xml @@ -1,61 +1,24 @@ - + layout="@layout/map_context_menu_button" /> - + - - - - - - - + layout="@layout/map_context_menu_button" /> \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 1101c8c3a1..5caebd957c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -1231,12 +1231,12 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo // Left button final View leftButtonView = view.findViewById(R.id.additional_button_left_view); - final TextView leftButton = (TextView) view.findViewById(R.id.additional_button_left); + final TextView leftButton = (TextView) leftButtonView.findViewById(R.id.button_text); fillButtonInfo(leftButtonController, leftButtonView, leftButton); // Right button final View rightButtonView = view.findViewById(R.id.additional_button_right_view); - final TextView rightButton = (TextView) view.findViewById(R.id.additional_button_right); + final TextView rightButton = (TextView) rightButtonView.findViewById(R.id.button_text); fillButtonInfo(rightButtonController, rightButtonView, rightButton); container.addView(view);