Merge pull request #10327 from osmandapp/Export-UI-Items

Export UI Items
This commit is contained in:
Vitaliy 2020-12-04 10:37:04 +00:00 committed by GitHub
commit 7ca7363483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 37 deletions

View file

@ -6,56 +6,50 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="@dimen/bottom_sheet_title_height" android:minHeight="@dimen/bottom_sheet_title_height"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding" android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/content_padding" android:paddingTop="@dimen/content_padding"
android:paddingEnd="@dimen/wikilink_bottom_sheet_padding"
android:paddingRight="@dimen/wikilink_bottom_sheet_padding" android:paddingRight="@dimen/wikilink_bottom_sheet_padding"
android:paddingBottom="@dimen/wikilink_bottom_sheet_padding"> android:paddingBottom="@dimen/wikilink_bottom_sheet_padding">
<LinearLayout <net.osmand.plus.widgets.TextViewEx
android:layout_width="0dp" android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:ellipsize="end"
android:layout_marginEnd="@dimen/content_padding" android:letterSpacing="@dimen/text_button_letter_spacing"
android:layout_marginRight="@dimen/content_padding" android:minHeight="@dimen/default_title_line_height"
android:layout_weight="1" android:textColor="?android:textColorPrimary"
android:orientation="vertical"> android:textSize="@dimen/default_list_text_size"
app:lineHeight="@dimen/default_title_line_height"
app:typeface="@string/font_roboto_medium"
tools:text="Some title" />
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/title" android:id="@+id/description"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:layout_below="@+id/title"
android:letterSpacing="@dimen/text_button_letter_spacing" android:ellipsize="end"
android:minHeight="@dimen/default_title_line_height" android:letterSpacing="@dimen/description_letter_spacing"
android:textColor="?android:textColorPrimary" android:minHeight="@dimen/default_desc_line_height"
android:textSize="@dimen/default_list_text_size" android:textColor="?android:textColorSecondary"
app:lineHeight="@dimen/default_title_line_height" android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium" app:lineHeight="@dimen/default_desc_line_height"
tools:text="Some title" /> app:typeface="@string/font_roboto_regular"
tools:text="Some description" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/selected_size" android:id="@+id/selected_size"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:letterSpacing="@dimen/text_button_letter_spacing" android:letterSpacing="@dimen/text_button_letter_spacing"
android:minHeight="@dimen/default_title_line_height" android:minHeight="@dimen/default_title_line_height"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
@ -64,7 +58,7 @@
app:typeface="@string/font_roboto_regular" app:typeface="@string/font_roboto_regular"
tools:text="5/6" /> tools:text="5/6" />
</LinearLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:id="@+id/select_all_button" android:id="@+id/select_all_button"

View file

@ -379,6 +379,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
iconId = R.drawable.ic_action_photo_dark; iconId = R.drawable.ic_action_photo_dark;
} }
builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes)); builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes));
builder.setDescription(AndroidUtils.formatSize(app, size));
} else if (fileSubtype.isMap() } else if (fileSubtype.isMap()
|| fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE || fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE
|| fileSubtype == FileSettingsItem.FileSubtype.VOICE) { || fileSubtype == FileSettingsItem.FileSubtype.VOICE) {
@ -389,7 +390,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
String mapDescription = getMapDescription(file); String mapDescription = getMapDescription(file);
String formattedSize = AndroidUtils.formatSize(app, size); String formattedSize = AndroidUtils.formatSize(app, size);
if (mapDescription != null) { if (mapDescription != null) {
builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_star, mapDescription, formattedSize)); builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_bold_point, mapDescription, formattedSize));
} else { } else {
builder.setDescription(formattedSize); builder.setDescription(formattedSize);
} }