From ed5f75193419152b7efc7d00da80cf3c4b2edfdb Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 28 May 2020 11:46:38 +0300 Subject: [PATCH] Fix review --- .../res/layout-land/fragment_coordinate_input_dialog.xml | 8 ++++---- .../DialogsAndNotificationsSettingsFragment.java | 8 -------- .../explore/travelcards/TravelDownloadUpdateCard.java | 6 ++---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/OsmAnd/res/layout-land/fragment_coordinate_input_dialog.xml b/OsmAnd/res/layout-land/fragment_coordinate_input_dialog.xml index c130a2b515..940317d3bb 100644 --- a/OsmAnd/res/layout-land/fragment_coordinate_input_dialog.xml +++ b/OsmAnd/res/layout-land/fragment_coordinate_input_dialog.xml @@ -57,15 +57,15 @@ android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" - android:paddingLeft="16dp" - android:paddingRight="16dp" + android:paddingLeft="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" android:text="@string/shared_string_options" android:textAllCaps="true" android:textColor="@color/color_white" android:textSize="@dimen/default_list_text_size" osmand:typeface="@string/font_roboto_medium" - android:paddingStart="16dp" - android:paddingEnd="16dp" /> + android:paddingStart="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" /> diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/DialogsAndNotificationsSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/DialogsAndNotificationsSettingsFragment.java index 95c4d8e29d..ec29d13f98 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/DialogsAndNotificationsSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/DialogsAndNotificationsSettingsFragment.java @@ -1,8 +1,5 @@ package net.osmand.plus.settings.fragments; -import android.view.LayoutInflater; -import android.view.View; - import androidx.preference.Preference; import androidx.preference.SwitchPreferenceCompat; @@ -12,11 +9,6 @@ public class DialogsAndNotificationsSettingsFragment extends BaseSettingsFragmen public static final String TAG = DialogsAndNotificationsSettingsFragment.class.getSimpleName(); - @Override - protected void createToolbar(LayoutInflater inflater, View view) { - super.createToolbar(inflater, view); - } - @Override protected void setupPreferences() { Preference mapDuringNavigationInfo = findPreference("dialogs_and_notifications_preferences_info"); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java index 49984b1604..d7aaa23bb7 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/TravelDownloadUpdateCard.java @@ -9,8 +9,6 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.StringRes; -import androidx.appcompat.content.res.AppCompatResources; -import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.RecyclerView; import net.osmand.plus.OsmandApplication; @@ -68,7 +66,7 @@ public class TravelDownloadUpdateCard extends BaseTravelCard { DownloadUpdateVH holder = (DownloadUpdateVH) viewHolder; this.ref = new WeakReference(holder); holder.title.setText(getTitle(loading)); - holder.icon.setImageResource(getIcon()); + holder.icon.setImageResource(getIconRes()); holder.description.setText(getDescription()); if (indexItem == null) { holder.fileDataContainer.setVisibility(View.GONE); @@ -117,7 +115,7 @@ public class TravelDownloadUpdateCard extends BaseTravelCard { return app.getString(download ? R.string.download_file : R.string.update_is_available); } - private int getIcon() { + private int getIconRes() { return download ? R.drawable.travel_card_download_icon : R.drawable.travel_card_update_icon; }