From 5ae37a101c59828aab3cbdf1e3f0bd6d1b0e5e79 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Mon, 22 Mar 2021 12:37:13 +0200 Subject: [PATCH] After code review fixes 1 --- OsmAnd/res/layout/route_line_color_card.xml | 2 -- .../plus/settings/fragments/ProfileAppearanceFragment.java | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/layout/route_line_color_card.xml b/OsmAnd/res/layout/route_line_color_card.xml index d1c96345b5..c25332de88 100644 --- a/OsmAnd/res/layout/route_line_color_card.xml +++ b/OsmAnd/res/layout/route_line_color_card.xml @@ -93,8 +93,6 @@ android:id="@+id/colors_card_container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingRight="@dimen/content_padding" - android:paddingLeft="@dimen/content_padding" android:paddingBottom="@dimen/content_padding_small"/> \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java index 3416222b95..690953d445 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java @@ -242,8 +242,6 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O findPreference(SELECT_ICON).setIconSpaceReserved(false); findPreference(SELECT_LOCATION_ICON).setIconSpaceReserved(false); findPreference(SELECT_NAV_ICON).setIconSpaceReserved(false); - findPreference(CUSTOMIZE_ROUTE_LINE).setIcon( - getIcon(R.drawable.ic_action_route_distance, getActiveColorRes())); if (getSelectedAppMode().equals(ApplicationMode.DEFAULT) && !isNewProfile) { findPreference(SELECT_ICON).setVisible(false); findPreference(ICON_ITEMS).setVisible(false); @@ -735,6 +733,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O boolean isDefaultProfile = getSelectedAppMode().equals(ApplicationMode.DEFAULT); boolean isPublicTransport = PUBLIC_TRANSPORT_KEY.equals(changedProfile.routingProfile); preference.setVisible(!isDefaultProfile && !isPublicTransport); + preference.setIcon(getIcon(R.drawable.ic_action_route_distance, getActiveColorRes())); } } @@ -1087,7 +1086,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O return false; if (routeService != that.routeService) return false; if (navigationIcon != that.navigationIcon) return false; - if (routeLineDrawInfo != that.routeLineDrawInfo) return false; + if (routeLineDrawInfo != null ? !routeLineDrawInfo.equals(that.routeLineDrawInfo) : that.routeLineDrawInfo != null) return false; return locationIcon == that.locationIcon; }