[UI] [Android] Unify download card style with buttons
Signed-off-by: Harry Bond <endim8@pm.me>
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3 KiB |
6
android/res/drawable/onmap_downloader_background.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFFFFF"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
|
||||
</shape>
|
|
@ -11,7 +11,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="?cardFrame"
|
||||
android:backgroundTint="?menuBackground"
|
||||
android:background="@drawable/onmap_downloader_background"
|
||||
android:padding="@dimen/margin_base"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
|
@ -21,84 +22,59 @@
|
|||
<LinearLayout
|
||||
android:layout_width="@dimen/square_block_size"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
android:gravity="center"
|
||||
tools:ignore="UselessParent">
|
||||
<TextView
|
||||
android:id="@+id/downloader_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:layout_marginBottom="@dimen/margin_base"
|
||||
tools:ignore="UselessParent">
|
||||
<TextView
|
||||
android:id="@+id/downloader_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_eighth"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Honduras"/>
|
||||
<TextView
|
||||
android:id="@+id/downloader_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:textStyle="normal"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Some title very loooooooooong title"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<TextView
|
||||
android:id="@+id/downloader_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_half"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="1000 MB"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/downloader_controls_frame"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="@dimen/height_block_base"
|
||||
android:clipChildren="false">
|
||||
<Button
|
||||
android:id="@+id/downloader_button"
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
android:layout_width="180dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
<app.organicmaps.widget.WheelProgressView
|
||||
android:id="@+id/wheel_downloader_progress"
|
||||
android:layout_width="@dimen/downloader_status_size"
|
||||
android:layout_height="@dimen/downloader_status_size"
|
||||
android:layout_gravity="center"
|
||||
app:wheelProgressColor="?colorAccent"
|
||||
app:wheelSecondaryColor="?dividerHorizontal"
|
||||
app:wheelThickness="@dimen/margin_eighth"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@+id/onmap_downloader_divider"
|
||||
android:background="?android:listDivider"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/margin_half_plus_eight"
|
||||
android:layout_marginEnd="@dimen/margin_half_plus_eight"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="@dimen/divider_height"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:layout_margin="@dimen/margin_eighth"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Honduras"/>
|
||||
<TextView
|
||||
android:id="@+id/downloader_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:textStyle="normal"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Some title very loooooooooong title"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<TextView
|
||||
android:id="@+id/downloader_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_half"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="1000 MB"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/banner_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:id="@+id/downloader_controls_frame"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="@dimen/height_block_base"
|
||||
android:clipChildren="false">
|
||||
<Button
|
||||
android:id="@+id/downloader_button"
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
android:layout_width="180dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
<app.organicmaps.widget.WheelProgressView
|
||||
android:id="@+id/wheel_downloader_progress"
|
||||
android:layout_width="@dimen/downloader_status_size"
|
||||
android:layout_height="@dimen/downloader_status_size"
|
||||
android:layout_gravity="center"
|
||||
app:wheelProgressColor="?colorAccent"
|
||||
app:wheelSecondaryColor="?dividerHorizontal"
|
||||
app:wheelThickness="@dimen/margin_eighth"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -16,8 +16,10 @@
|
|||
android:clipChildren="false"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="?cardFrame"
|
||||
android:backgroundTint="?menuBackground"
|
||||
android:background="@drawable/onmap_downloader_background"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/downloader_parent"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -65,16 +67,5 @@
|
|||
android:visibility="visible"
|
||||
tools:visibility="visible"/>
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/onmap_downloader_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:layout_height="@dimen/divider_height"
|
||||
android:background="?android:listDivider"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/banner_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<declare-styleable name="ThemeAttrs">
|
||||
<attr name="fullscreenDialogTheme" format="reference" />
|
||||
<attr name="windowBackgroundForced" format="reference|color" />
|
||||
<attr name="cardFrame" format="reference" />
|
||||
<attr name="cardBackground" format="reference" />
|
||||
<attr name="clickableBackground" format="reference" />
|
||||
<attr name="statusBar" format="color" />
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<item name="android:statusBarColor">?colorPrimary</item>
|
||||
<item name="alertDialogTheme">@style/MwmTheme.AlertDialog</item>
|
||||
<item name="windowBackgroundForced">@color/bg_window</item>
|
||||
<item name="cardFrame">@drawable/card_frame</item>
|
||||
<item name="cardBackground">@color/bg_cards</item>
|
||||
<item name="fullscreenDialogTheme">@style/MwmTheme.DialogFragment.Fullscreen</item>
|
||||
<item name="colorPrimary">@color/bg_primary</item>
|
||||
|
@ -154,7 +153,6 @@
|
|||
|
||||
<item name="alertDialogTheme">@style/MwmTheme.Night.AlertDialog</item>
|
||||
<item name="windowBackgroundForced">@color/bg_window_night</item>
|
||||
<item name="cardFrame">@drawable/card_frame_night</item>
|
||||
<item name="cardBackground">@color/bg_cards_night</item>
|
||||
<item name="fullscreenDialogTheme">@style/MwmTheme.DialogFragment.Fullscreen.Night</item>
|
||||
<item name="colorPrimary">@color/bg_primary_night</item>
|
||||
|
|