Refactor
This commit is contained in:
parent
19530a9563
commit
6396b96e8c
2 changed files with 27 additions and 49 deletions
|
@ -10,65 +10,45 @@
|
||||||
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">
|
||||||
android:paddingStart="@dimen/content_padding"
|
|
||||||
android:paddingEnd="@dimen/wikilink_bottom_sheet_padding">
|
|
||||||
|
|
||||||
<LinearLayout
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/first_title"
|
android:id="@+id/title"
|
||||||
android:layout_width="wrap_content"
|
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:orientation="horizontal">
|
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" />
|
||||||
|
|
||||||
<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_height="wrap_content"
|
|
||||||
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" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/second_title"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_below="@+id/title"
|
||||||
android:layout_marginEnd="@dimen/content_padding"
|
android:ellipsize="end"
|
||||||
android:layout_marginRight="@dimen/content_padding"
|
android:letterSpacing="@dimen/description_letter_spacing"
|
||||||
android:layout_below="@+id/first_title"
|
android:minHeight="@dimen/default_desc_line_height"
|
||||||
android:orientation="horizontal">
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="@dimen/default_desc_text_size"
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
app:lineHeight="@dimen/default_desc_line_height"
|
||||||
android:id="@+id/description"
|
app:typeface="@string/font_roboto_regular"
|
||||||
android:layout_width="wrap_content"
|
tools:text="Some description" />
|
||||||
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: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"
|
||||||
|
@ -76,8 +56,7 @@
|
||||||
android:textSize="@dimen/default_list_text_size"
|
android:textSize="@dimen/default_list_text_size"
|
||||||
app:lineHeight="@dimen/default_title_line_height"
|
app:lineHeight="@dimen/default_title_line_height"
|
||||||
app:typeface="@string/font_roboto_regular"
|
app:typeface="@string/font_roboto_regular"
|
||||||
tools:text="5/6"
|
tools:text="5/6" />
|
||||||
android:layout_alignParentEnd="true" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
|
@ -375,12 +375,11 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, activeColorRes));
|
builder.setIcon(uiUtilities.getIcon(R.drawable.ic_action_route_distance, activeColorRes));
|
||||||
} else if (file.getAbsolutePath().contains(IndexConstants.AV_INDEX_DIR)) {
|
} else if (file.getAbsolutePath().contains(IndexConstants.AV_INDEX_DIR)) {
|
||||||
int iconId = AudioVideoNotesPlugin.getIconIdForRecordingFile(file);
|
int iconId = AudioVideoNotesPlugin.getIconIdForRecordingFile(file);
|
||||||
String formattedSize = AndroidUtils.formatSize(app, size);
|
|
||||||
if (iconId == -1) {
|
if (iconId == -1) {
|
||||||
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(formattedSize);
|
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) {
|
||||||
|
|
Loading…
Reference in a new issue