diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/DangerousGoodsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/DangerousGoodsFragment.java index f89e9e90c57..56ef93742a6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/DangerousGoodsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/DangerousGoodsFragment.java @@ -11,9 +11,11 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.DimenRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.Toolbar; @@ -122,9 +124,22 @@ protected void onBindPreferenceViewHolder(Preference preference, PreferenceViewH holder.itemView.setContentDescription(getString(R.string.shared_string_class) + " " + hazmatClass + " " + preference.getTitle()); } + View item = holder.itemView.findViewById(R.id.selectable_list_item); + item.setMinimumHeight(getDimen(R.dimen.wpt_list_item_height)); + + View icon = holder.itemView.findViewById(android.R.id.icon); + ViewGroup.LayoutParams layoutParams = icon.getLayoutParams(); + int iconSize = getDimen(R.dimen.big_icon_size); + layoutParams.width = iconSize; + layoutParams.height = iconSize; + icon.setLayoutParams(layoutParams); } } + private int getDimen(@DimenRes int id){ + return app.getResources().getDimensionPixelSize(id); + } + private void resetToDefault() { ApplicationMode mode = getSelectedAppMode(); for (RoutingParameter parameter : parameters) { diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/SettingsScreenType.java b/OsmAnd/src/net/osmand/plus/settings/fragments/SettingsScreenType.java index 58fa7e467eb..53332285757 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/SettingsScreenType.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/SettingsScreenType.java @@ -44,7 +44,7 @@ public enum SettingsScreenType { ANT_PLUS_SETTINGS(ExternalDevicesListFragment.class.getName(), false, null, R.xml.antplus_settings, R.layout.global_preference_toolbar), WEATHER_SETTINGS(WeatherSettingsFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.weather_settings, R.layout.profile_preference_toolbar), EXTERNAL_SETTINGS_WRITE_TO_TRACK_SETTINGS(ExternalSettingsWriteToTrackSettingsFragment.class.getName(), true, ApplyQueryType.BOTTOM_SHEET, R.xml.external_sensors_write_to_track_settings, R.layout.profile_preference_toolbar), - DANGEROUS_GOODS(DangerousGoodsFragment.class.getName(), true, ApplyQueryType.SNACK_BAR, R.xml.dangerous_goods_parameters, R.layout.global_preference_toolbar); + DANGEROUS_GOODS(DangerousGoodsFragment.class.getName(), true, ApplyQueryType.NONE, R.xml.dangerous_goods_parameters, R.layout.global_preference_toolbar); public final String fragmentName; public final boolean profileDependent;