Remove unnecessary TextView, fix icons; increase text size
This commit is contained in:
parent
a1aa137c96
commit
050f9a190e
3 changed files with 4 additions and 21 deletions
|
@ -89,17 +89,6 @@
|
|||
android:maxLines="1"
|
||||
android:text="@string/show_direction"
|
||||
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
android:id="@+id/show_direction_text_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:textColor="@color/map_widget_blue_pressed"
|
||||
tools:text="Top bar"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
|
|
@ -2,17 +2,14 @@ package net.osmand.plus.mapmarkers;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||
|
||||
public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment {
|
||||
|
@ -40,21 +37,21 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
MapActivity mapActivity = (MapActivity) getActivity();
|
||||
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
|
||||
|
||||
final View mainView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_marker_options_bottom_sheet_dialog, container);
|
||||
|
||||
((ImageView) mainView.findViewById(R.id.sort_by_icon)).setImageDrawable(getContentIcon(R.drawable.ic_sort_waypoint_dark));
|
||||
OsmandSettings.MapMarkersMode mode = getMyApplication().getSettings().MAP_MARKERS_MODE.get();
|
||||
int displayedCount = getMyApplication().getSettings().DISPLAYED_MARKERS_WIDGETS_COUNT.get();
|
||||
ImageView showDirectionIcon = (ImageView) mainView.findViewById(R.id.show_direction_icon);
|
||||
int imageResId = 0;
|
||||
switch (mode) {
|
||||
case TOOLBAR:
|
||||
imageResId = R.drawable.ic_action_device_topbar;
|
||||
imageResId = displayedCount == 1 ? R.drawable.ic_action_device_topbar : R.drawable.ic_action_device_topbar_two;
|
||||
break;
|
||||
case WIDGETS:
|
||||
imageResId = R.drawable.ic_action_device_widget;
|
||||
imageResId = displayedCount == 1 ? R.drawable.ic_action_device_widget : R.drawable.ic_action_device_widget_two;
|
||||
break;
|
||||
}
|
||||
showDirectionIcon.setBackgroundDrawable(getContentIcon(R.drawable.ic_action_device_top));
|
||||
|
@ -66,9 +63,6 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
|
|||
((ImageView) mainView.findViewById(R.id.save_as_new_track_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_polygom_dark));
|
||||
((ImageView) mainView.findViewById(R.id.move_all_to_history_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_history2));
|
||||
|
||||
((TextView) mainView.findViewById(R.id.show_direction_text_view)).setTextColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.color_dialog_buttons_dark : R.color.map_widget_blue_pressed));
|
||||
((TextView) mainView.findViewById(R.id.show_direction_text_view)).setText(getMyApplication().getSettings().MAP_MARKERS_MODE.get().toHumanString(getActivity()));
|
||||
|
||||
View sortByRow = mainView.findViewById(R.id.sort_by_row);
|
||||
if (!showSortBy) {
|
||||
sortByRow.setVisibility(View.GONE);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
|
|||
private static final long USE_FINGER_LOCATION_DELAY = 1000;
|
||||
private static final int MAP_REFRESH_MESSAGE = OsmAndConstants.UI_HANDLER_MAP_VIEW + 6;
|
||||
protected static final int DIST_TO_SHOW = 80;
|
||||
private static final int TEXT_SIZE = 12;
|
||||
private static final int TEXT_SIZE = 14;
|
||||
private static final int VERTICAL_OFFSET = 10;
|
||||
|
||||
private final MapActivity map;
|
||||
|
|
Loading…
Reference in a new issue