[android] Implemented downloader banner layout

This commit is contained in:
Alexander Zatsepin 2018-06-26 20:28:48 +03:00 committed by yoksnod
parent 0cf466763f
commit 1e2a23fed2
6 changed files with 75 additions and 13 deletions

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/megafon_button"/>
<corners android:radius="@dimen/megafon_button_corner_radius"/>
</shape>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/megafon_button_pressed"/>
<corners android:radius="@dimen/megafon_button_corner_radius"/>
</shape>

View file

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="60dp"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/margin_base_plus"
android:padding="@dimen/margin_base"
android:clipToPadding="false"
android:clipChildren="false"
android:layout_gravity="center"
@ -27,7 +26,6 @@
android:textAppearance="@style/MwmTextAppearance.Body2"
android:gravity="center_horizontal"
tools:text="Honduras"/>
<TextView
android:id="@+id/downloader_title"
android:layout_width="wrap_content"
@ -36,7 +34,6 @@
android:textSize="20sp"
android:gravity="center_horizontal"
tools:text="Some title"/>
<TextView
android:id="@+id/downloader_size"
android:layout_width="wrap_content"
@ -45,7 +42,6 @@
android:textAppearance="@style/MwmTextAppearance.Body2"
android:gravity="center_horizontal"
tools:text="1000 MB"/>
<FrameLayout
android:id="@+id/downloader_controls_frame"
android:layout_width="180dp"
@ -56,7 +52,6 @@
style="@style/MwmWidget.Button.Primary"
android:layout_width="180dp"
android:visibility="gone"/>
<com.mapswithme.maps.widget.WheelProgressView
android:id="@+id/wheel_downloader_progress"
android:layout_width="@dimen/downloader_status_size"
@ -68,5 +63,58 @@
android:visibility="visible"
tools:visibility="visible"/>
</FrameLayout>
<LinearLayout
android:id="@+id/banner"
android:layout_marginTop="@dimen/margin_half"
android:orientation="vertical"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:visibility="visible">
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="?android:listDivider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half"
android:gravity="center_vertical">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_brand_megafon_green"
android:layout_marginRight="@dimen/margin_half"
android:layout_marginEnd="@dimen/margin_half"/>
<TextView
android:id="@id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body4"
android:textColor="?android:textColorPrimary"
android:text="@string/banner_megafon_banner_message"/>
</LinearLayout>
<Button
android:id="@+id/banner_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/margin_half"
android:paddingStart="@dimen/margin_half"
android:paddingRight="@dimen/margin_half"
android:paddingEnd="@dimen/margin_half"
android:paddingTop="@dimen/margin_quarter_plus"
android:paddingBottom="@dimen/margin_quarter_plus"
android:layout_marginTop="@dimen/margin_base"
android:fontFamily="@string/robotoMedium"
android:textAllCaps="false"
android:textSize="@dimen/text_size_body_3"
android:text="@string/banner_megafon_banner_button"
android:background="@drawable/button_megafon"
style="?android:attr/borderlessButtonStyle"
android:textColor="@color/white_primary"
tools:targetApi="jelly_bean"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</ScrollView>

View file

@ -198,9 +198,9 @@
<color name="bg_brand_partner18">#FF00B956</color>
<color name="bg_brand_partner18_pressed">#FF00B956</color>
<color name="bg_brand_partner19">#FF571A8C</color>
<color name="bg_brand_partner19_pressed">#FF571A8C</color>
<color name="bg_brand_partner20">#FF571A8C</color>
<color name="bg_brand_partner20_pressed">#FF571A8C</color>
<color name="bg_brand_partner19_pressed">#FF450F4F</color>
<color name="bg_brand_partner20">@color/bg_brand_partner19</color>
<color name="bg_brand_partner20_pressed">@color/bg_brand_partner19_pressed</color>
<!-- Banner colors -->
<color name="bg_banner_color">#FFFDFFE6</color>
@ -214,6 +214,8 @@
<color name="banner_action_btn_start_anim_night">#FF888A82</color>
<color name="banner_action_btn_end_anim">#FFD9D2C3</color>
<color name="banner_action_btn_end_anim_night">#FF71736C</color>
<color name="megafon_button">@color/bg_brand_partner19</color>
<color name="megafon_button_pressed">@color/bg_brand_partner19_pressed</color>
<!-- Rating colors -->
<color name="rating_excellent">#43A047</color>

View file

@ -188,6 +188,8 @@
<dimen name="placepage_banner_button_height">@dimen/primary_button_min_height</dimen>
<dimen name="placepage_banner_button_margin_top">5dp</dimen>
<dimen name="placepage_banner_small_action_corner">20dp</dimen>
<dimen name="megafon_button_min_height">28dp</dimen>
<dimen name="megafon_button_corner_radius">@dimen/megafon_button_min_height</dimen>
<!-- Place page taxi-->
<dimen name="placepage_taxi_button_min_width">96dp</dimen>

View file

@ -21,7 +21,6 @@
<item name="cardFrame">@drawable/card_frame</item>
<item name="cardBackground">@color/bg_cards</item>
<item name="fullscreenDialogTheme">@style/MwmTheme.DialogFragment.Fullscreen</item>
<item name="android:buttonStyle">@style/MwmWidget.Button.Primary</item>
<item name="colorPrimary">@color/bg_primary</item>
<item name="colorControlNormal">?secondary</item>
<item name="colorAccent">@color/base_accent</item>
@ -143,7 +142,6 @@
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoRegular</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:buttonStyle">@style/MwmWidget.Button.Primary</item>
<item name="clickableBackground">?selectableItemBackground</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>