Fix dashboard back button
This commit is contained in:
parent
f2dc4cdc4d
commit
8a63a0ce53
2 changed files with 16 additions and 13 deletions
|
@ -7,8 +7,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||
android:background="@color/app_bar_color_light"
|
||||
app:contentInsetLeft="4dp"
|
||||
app:contentInsetStart="4dp"
|
||||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetRight="0dp"
|
||||
app:contentInsetEnd="0dp">
|
||||
|
||||
|
@ -25,17 +25,18 @@
|
|||
android:gravity="start"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<ImageButton
|
||||
android:id="@+id/toolbar_back"
|
||||
style="@style/Widget.AppCompat.Toolbar.Button.Navigation"
|
||||
android:layout_width="@dimen/acceptable_touch_radius"
|
||||
android:layout_height="@dimen/acceptable_touch_radius"
|
||||
android:layout_marginStart="@dimen/list_item_button_padding"
|
||||
android:layout_marginLeft="@dimen/list_item_button_padding"
|
||||
android:layout_marginEnd="@dimen/list_item_button_padding"
|
||||
android:layout_marginRight="@dimen/list_item_button_padding"
|
||||
android:contentDescription="@string/back_to_map"
|
||||
android:layout_marginLeft="@dimen/multi_selection_menu_padding_top"
|
||||
android:layout_marginRight="@dimen/multi_selection_menu_padding_top"
|
||||
android:layout_width="@dimen/standard_icon_size"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/dashboard_button_light"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_arrow_back"
|
||||
tools:visibility="visible"/>
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/toolbar_list"
|
||||
|
@ -53,6 +54,7 @@
|
|||
android:id="@+id/toolbar_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="center"
|
||||
android:textColor="@color/abc_primary_text_material_dark"
|
||||
android:textSize="@dimen/abc_text_size_large_material"
|
||||
|
|
|
@ -24,6 +24,7 @@ import android.widget.ArrayAdapter;
|
|||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ImageView.ScaleType;
|
||||
import android.widget.ListView;
|
||||
|
@ -49,13 +50,11 @@ import net.osmand.AndroidUtils;
|
|||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ValueHolder;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnRowItemClick;
|
||||
import net.osmand.plus.ContextMenuItem;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
|
@ -78,6 +77,8 @@ import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
|
|||
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameter;
|
||||
import net.osmand.plus.routing.IRouteInformationListener;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||
import net.osmand.plus.srtmplugin.ContourLinesMenu;
|
||||
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||
import net.osmand.plus.srtmplugin.TerrainFragment;
|
||||
|
@ -340,7 +341,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
|||
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||
ImageView lst = (ImageView) dashboardView.findViewById(R.id.toolbar_list);
|
||||
lst.setVisibility(View.GONE);
|
||||
ImageView back = (ImageView) dashboardView.findViewById(R.id.toolbar_back);
|
||||
ImageButton back = (ImageButton) dashboardView.findViewById(R.id.toolbar_back);
|
||||
Drawable icBack = getMyApplication().getUIUtilities().getIcon(AndroidUtils.getNavigationIconResId(mapActivity));
|
||||
back.setImageDrawable(icBack);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
Loading…
Reference in a new issue