From 5b590cf3ecf97d03cf7c37b251eb051e0c65d7e8 Mon Sep 17 00:00:00 2001 From: cepprice Date: Tue, 23 Feb 2021 22:20:41 +0500 Subject: [PATCH] Cosmetic changes --- .../settings/backend/ApplicationMode.java | 8 +-- .../fragments/DuplicatesSettingsAdapter.java | 11 ++-- .../fragments/ExportItemsBottomSheet.java | 16 ++--- .../fragments/ProfileAppearanceFragment.java | 65 +++++++++---------- 4 files changed, 49 insertions(+), 51 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java index 8cbcd4824b..3493a0768a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java @@ -1,9 +1,5 @@ package net.osmand.plus.settings.backend; -import androidx.annotation.ColorInt; -import androidx.annotation.DrawableRes; -import androidx.core.content.ContextCompat; - import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.annotations.Expose; @@ -28,6 +24,10 @@ import java.util.List; import java.util.Map; import java.util.Set; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.core.content.ContextCompat; + import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_ALTITUDE; import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_BATTERY; import static net.osmand.plus.views.mapwidgets.MapWidgetRegistry.WIDGET_BEARING; diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java index 952ecea396..4b8e40f1a0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java @@ -6,11 +6,6 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; -import alice.tuprolog.Int; -import androidx.annotation.NonNull; -import androidx.core.content.ContextCompat; -import androidx.recyclerview.widget.RecyclerView; - import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; @@ -35,12 +30,16 @@ import net.osmand.plus.settings.backend.ApplicationMode; import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean; import net.osmand.util.Algorithms; -import org.apache.commons.logging.Log; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; import java.io.File; import java.util.List; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; + import static net.osmand.plus.settings.backend.backup.FileSettingsItem.FileSubtype; public class DuplicatesSettingsAdapter extends RecyclerView.Adapter { diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java index 6fcd201de6..59c7327975 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java @@ -6,13 +6,6 @@ import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.content.ContextCompat; -import androidx.core.widget.CompoundButtonCompat; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentManager; - import net.osmand.AndroidUtils; import net.osmand.GPXUtilities.GPXTrackAnalysis; import net.osmand.IndexConstants; @@ -61,13 +54,20 @@ import net.osmand.plus.settings.fragments.ExportSettingsAdapter.OnItemSelectedLi import net.osmand.util.Algorithms; import net.osmand.view.ThreeStateCheckbox; -import org.apache.commons.logging.Log; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; import java.io.File; import java.util.ArrayList; import java.util.List; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.widget.CompoundButtonCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; + import static net.osmand.view.ThreeStateCheckbox.State.CHECKED; import static net.osmand.view.ThreeStateCheckbox.State.MISC; import static net.osmand.view.ThreeStateCheckbox.State.UNCHECKED; diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java index 624d90608c..49fe22be21 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ProfileAppearanceFragment.java @@ -23,6 +23,38 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; +import net.osmand.AndroidUtils; +import net.osmand.IndexConstants; +import net.osmand.PlatformUtil; +import net.osmand.plus.R; +import net.osmand.plus.UiUtilities; +import net.osmand.plus.UiUtilities.DialogButtonType; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.profiles.LocationIcon; +import net.osmand.plus.profiles.NavigationIcon; +import net.osmand.plus.profiles.ProfileIconColors; +import net.osmand.plus.profiles.ProfileIcons; +import net.osmand.plus.profiles.SelectProfileBottomSheet; +import net.osmand.plus.profiles.SelectProfileBottomSheet.DialogMode; +import net.osmand.plus.profiles.SelectProfileBottomSheet.OnSelectProfileCallback; +import net.osmand.plus.routepreparationmenu.cards.BaseCard; +import net.osmand.plus.routing.RouteProvider; +import net.osmand.plus.settings.backend.ApplicationMode; +import net.osmand.plus.settings.backend.backup.ProfileSettingsItem; +import net.osmand.plus.settings.backend.backup.SettingsHelper; +import net.osmand.plus.track.ColorsCard; +import net.osmand.plus.track.CustomColorBottomSheet; +import net.osmand.plus.widgets.FlowLayout; +import net.osmand.plus.widgets.OsmandTextFieldBoxes; +import net.osmand.util.Algorithms; + +import org.apache.commons.logging.Log; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import androidx.activity.OnBackPressedCallback; import androidx.annotation.ColorInt; import androidx.annotation.NonNull; @@ -38,38 +70,6 @@ import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; import androidx.recyclerview.widget.RecyclerView; -import net.osmand.AndroidUtils; -import net.osmand.IndexConstants; -import net.osmand.PlatformUtil; -import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.routepreparationmenu.cards.BaseCard; -import net.osmand.plus.settings.backend.ApplicationMode; -import net.osmand.plus.R; -import net.osmand.plus.settings.backend.backup.ProfileSettingsItem; -import net.osmand.plus.settings.backend.backup.SettingsHelper; -import net.osmand.plus.UiUtilities; -import net.osmand.plus.UiUtilities.DialogButtonType; -import net.osmand.plus.profiles.LocationIcon; -import net.osmand.plus.profiles.NavigationIcon; -import net.osmand.plus.profiles.ProfileIconColors; -import net.osmand.plus.profiles.ProfileIcons; -import net.osmand.plus.profiles.SelectProfileBottomSheet; -import net.osmand.plus.profiles.SelectProfileBottomSheet.DialogMode; -import net.osmand.plus.profiles.SelectProfileBottomSheet.OnSelectProfileCallback; -import net.osmand.plus.routing.RouteProvider; -import net.osmand.plus.track.ColorsCard; -import net.osmand.plus.track.CustomColorBottomSheet; -import net.osmand.plus.widgets.FlowLayout; -import net.osmand.plus.widgets.OsmandTextFieldBoxes; -import net.osmand.util.Algorithms; - -import org.apache.commons.logging.Log; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_SETTINGS_ID; import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILES_LIST_UPDATED_ARG; import static net.osmand.plus.profiles.SelectProfileBottomSheet.PROFILE_KEY_ARG; @@ -940,7 +940,6 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment implements O return; } - if (cardOfColors.isBaseColor(color)) { changedProfile.customColor = null; changedProfile.color = changedProfile.getProfileColorByColorValue(color);