From 6396b96e8cf60411bb0fa45b52fa01c84594b2b8 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Fri, 4 Dec 2020 12:31:54 +0200 Subject: [PATCH] Refactor --- OsmAnd/res/layout/settings_group_title.xml | 73 +++++++------------ .../fragments/ExportItemsBottomSheet.java | 3 +- 2 files changed, 27 insertions(+), 49 deletions(-) diff --git a/OsmAnd/res/layout/settings_group_title.xml b/OsmAnd/res/layout/settings_group_title.xml index 73a580b1c5..32629ed2de 100644 --- a/OsmAnd/res/layout/settings_group_title.xml +++ b/OsmAnd/res/layout/settings_group_title.xml @@ -10,65 +10,45 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/bottom_sheet_title_height" + android:paddingStart="@dimen/content_padding" android:paddingLeft="@dimen/content_padding" android:paddingTop="@dimen/content_padding" + android:paddingEnd="@dimen/wikilink_bottom_sheet_padding" android:paddingRight="@dimen/wikilink_bottom_sheet_padding" - android:paddingBottom="@dimen/wikilink_bottom_sheet_padding" - android:paddingStart="@dimen/content_padding" - android:paddingEnd="@dimen/wikilink_bottom_sheet_padding"> + android:paddingBottom="@dimen/wikilink_bottom_sheet_padding"> - + android:ellipsize="end" + android:letterSpacing="@dimen/text_button_letter_spacing" + android:minHeight="@dimen/default_title_line_height" + android:textColor="?android:textColorPrimary" + android:textSize="@dimen/default_list_text_size" + app:lineHeight="@dimen/default_title_line_height" + app:typeface="@string/font_roboto_medium" + tools:text="Some title" /> - - - - - - - - + android:layout_below="@+id/title" + android:ellipsize="end" + android:letterSpacing="@dimen/description_letter_spacing" + android:minHeight="@dimen/default_desc_line_height" + android:textColor="?android:textColorSecondary" + android:textSize="@dimen/default_desc_text_size" + app:lineHeight="@dimen/default_desc_line_height" + app:typeface="@string/font_roboto_regular" + tools:text="Some description" /> + tools:text="5/6" /> diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java index 88ae8d1698..f5d52366fe 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportItemsBottomSheet.java @@ -375,12 +375,11 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment { builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, activeColorRes)); } else if (file.getAbsolutePath().contains(IndexConstants.AV_INDEX_DIR)) { int iconId = AudioVideoNotesPlugin.getIconIdForRecordingFile(file); - String formattedSize = AndroidUtils.formatSize(app, size); if (iconId == -1) { iconId = R.drawable.ic_action_photo_dark; } builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes)); - builder.setDescription(formattedSize); + builder.setDescription(AndroidUtils.formatSize(app, size)); } else if (fileSubtype.isMap() || fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE || fileSubtype == FileSettingsItem.FileSubtype.VOICE) {