diff --git a/OsmAnd/res/layout/fragment_options_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_options_bottom_sheet_dialog.xml new file mode 100644 index 0000000000..05da9bd3d5 --- /dev/null +++ b/OsmAnd/res/layout/fragment_options_bottom_sheet_dialog.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_snap_to_road_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_snap_to_road_bottom_sheet_dialog.xml index 05224c222b..bd769dc4ac 100644 --- a/OsmAnd/res/layout/fragment_snap_to_road_bottom_sheet_dialog.xml +++ b/OsmAnd/res/layout/fragment_snap_to_road_bottom_sheet_dialog.xml @@ -3,6 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/bg_color" android:orientation="vertical"> diff --git a/OsmAnd/res/layout/list_item_icon_and_title.xml b/OsmAnd/res/layout/list_item_icon_and_title.xml index 24308873c8..e98a58a395 100644 --- a/OsmAnd/res/layout/list_item_icon_and_title.xml +++ b/OsmAnd/res/layout/list_item_icon_and_title.xml @@ -14,8 +14,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" - android:layout_marginEnd="16dp" - android:layout_marginRight="16dp" + android:layout_marginEnd="24dp" + android:layout_marginRight="24dp" tools:src="@drawable/ic_action_car_dark"/> + Options OsmAnd will add additional points, depending on the navigation type. Choose navigation type Please add at least one point. @@ -792,7 +793,7 @@ Clear Clear all Save - Save as Track + Save as new Track Rename Delete Delete all @@ -2680,5 +2681,5 @@ File %1$s does not contain waypoints, import it as a track? Save as new segment Move Point - Add segment to the track + Add to a track diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java new file mode 100644 index 0000000000..fb2749fb6a --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/measurementtool/OptionsBottomSheetDialogFragment.java @@ -0,0 +1,39 @@ +package net.osmand.plus.measurementtool; + +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.view.ContextThemeWrapper; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; + +import net.osmand.plus.R; +import net.osmand.plus.base.BottomSheetDialogFragment; + +public class OptionsBottomSheetDialogFragment extends BottomSheetDialogFragment { + + public final static String TAG = "OptionsBottomSheetDialogFragment"; + + @Nullable + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + final boolean nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls(); + final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme; + + final View mainView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_options_bottom_sheet_dialog, null); + + ((ImageView) mainView.findViewById(R.id.snap_to_road_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_snap_to_road)); + ((ImageView) mainView.findViewById(R.id.save_as_new_track_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_polygom_dark)); + ((ImageView) mainView.findViewById(R.id.add_to_the_track_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_split_interval)); + ((ImageView) mainView.findViewById(R.id.clear_all_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_reset_to_default_dark)); + mainView.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + dismiss(); + } + }); + + return mainView; + } +} diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java index f13b7f5456..a61f8839da 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SnapToRoadBottomSheetDialogFragment.java @@ -34,16 +34,11 @@ public class SnapToRoadBottomSheetDialogFragment extends BottomSheetDialogFragme final OsmandSettings settings = getMyApplication().getSettings(); final boolean nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls(); final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme; - final int backgroundColor = ContextCompat.getColor(getActivity(), - nightMode ? R.color.ctx_menu_info_view_bg_dark : R.color.ctx_menu_info_view_bg_light); final View view = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_snap_to_road_bottom_sheet_dialog, container); - view.setBackgroundColor(backgroundColor); if (nightMode) { ((TextView) view.findViewById(R.id.cancel_row_text)) .setTextColor(ContextCompat.getColor(getActivity(), R.color.dashboard_general_button_text_dark)); - } else { - view.findViewById(R.id.divider).setBackgroundResource(R.drawable.divider); } view.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() { @Override