forked from organicmaps/organicmaps
[android] New layouts and styles.
This commit is contained in:
parent
1a1d054688
commit
8b374367fe
13 changed files with 272 additions and 21 deletions
22
android/res/animator/show_zoom_in_alpha.xml
Normal file
22
android/res/animator/show_zoom_in_alpha.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@integer/anim_fade_main"
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="0.3"
|
||||
android:valueTo="1.0"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="0.3"
|
||||
android:valueTo="1.0"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="0.3"
|
||||
android:valueTo="1.0"/>
|
||||
</set>
|
22
android/res/animator/show_zoom_out_alpha.xml
Normal file
22
android/res/animator/show_zoom_out_alpha.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@integer/anim_fade_main"
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.3"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.3"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@integer/anim_menu"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.3"/>
|
||||
</set>
|
7
android/res/drawable-land/bg_circle_panel.xml
Normal file
7
android/res/drawable-land/bg_circle_panel.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/bg_panel"/>
|
||||
<corners android:radius="100dp"/>
|
||||
</shape>
|
7
android/res/drawable-land/bg_circle_panel_night.xml
Normal file
7
android/res/drawable-land/bg_circle_panel_night.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/bg_panel_night"/>
|
||||
<corners android:radius="100dp"/>
|
||||
</shape>
|
6
android/res/drawable/bg_circle_panel.xml
Normal file
6
android/res/drawable/bg_circle_panel.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/bg_panel"/>
|
||||
</shape>
|
6
android/res/drawable/bg_circle_panel_night.xml
Normal file
6
android/res/drawable/bg_circle_panel_night.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/bg_panel_night"/>
|
||||
</shape>
|
63
android/res/layout-land/layout_nav_search.xml
Normal file
63
android/res/layout-land/layout_nav_search.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="?navButtonsTheme"
|
||||
tools:background="@color/bg_primary">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_frame"
|
||||
android:layout_width="286dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="46dp"
|
||||
android:background="?searchLayoutBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/margin_quarter"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_fuel"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:src="@drawable/ic_routing_fuel_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_parking"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:src="@drawable/ic_routing_parking_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_food"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:src="@drawable/ic_routing_food_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_shop"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:src="@drawable/ic_routing_shop_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_atm"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:src="@drawable/ic_routing_atm_on"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_search"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:background="?nav_background"
|
||||
android:src="@drawable/ic_menu_search"
|
||||
android:tint="@null"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -6,4 +6,5 @@
|
|||
android:layout_height="match_parent">
|
||||
<include layout="@layout/layout_nav_top"/>
|
||||
<include layout="@layout/layout_nav_bottom"/>
|
||||
<include layout="@layout/layout_nav_search"/>
|
||||
</FrameLayout>
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
android:layout_width="@dimen/nav_icon_size"
|
||||
android:layout_height="@dimen/nav_icon_size"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:src="@drawable/ic_voice_on"
|
||||
android:background="?selectableItemBackgroundBorderless"/>
|
||||
</FrameLayout>
|
||||
|
|
78
android/res/layout/layout_nav_search.xml
Normal file
78
android/res/layout/layout_nav_search.xml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="?navButtonsTheme"
|
||||
tools:background="@color/bg_primary">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/search_frame"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginBottom="122dp"
|
||||
android:layout_marginLeft="-70dp"
|
||||
android:layout_marginStart="-70dp"
|
||||
android:background="?searchLayoutBackground"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_fuel"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@drawable/ic_routing_fuel_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_parking"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_toEndOf="@id/search_fuel"
|
||||
android:layout_toRightOf="@id/search_fuel"
|
||||
android:src="@drawable/ic_routing_parking_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_food"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_routing_food_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_shop"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_toEndOf="@id/search_fuel"
|
||||
android:layout_toRightOf="@id/search_fuel"
|
||||
android:src="@drawable/ic_routing_shop_on"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_atm"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@drawable/ic_routing_atm_on"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_search"
|
||||
style="@style/MwmWidget.SearchNavigationButton"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginBottom="190dp"
|
||||
android:background="?nav_background"
|
||||
android:src="@drawable/ic_menu_search"
|
||||
android:tint="@null"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,9 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="MwmWidget"/>
|
||||
|
||||
<style name="MwmWidget.ProgressWheel"/>
|
||||
|
||||
<style name="MwmWidget.FrameLayout"/>
|
||||
|
||||
<style name="MwmWidget.Downloader"/>
|
||||
|
||||
<style name="BottomSheet.Icon">
|
||||
|
@ -13,7 +17,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MwmWidget.MapButton"
|
||||
parent="android:Widget.ImageButton">
|
||||
parent="android:Widget.ImageButton">
|
||||
<item name="android:scaleType">center</item>
|
||||
<item name="android:layout_height">64dp</item>
|
||||
<item name="android:layout_width">64dp</item>
|
||||
|
@ -45,49 +49,73 @@
|
|||
</style>
|
||||
|
||||
<style name="MwmWidget.Floating">
|
||||
<item name="android:elevation" tools:ignore="NewApi">@dimen/appbar_elevation</item>
|
||||
<item name="android:elevation"
|
||||
tools:ignore="NewApi">@dimen/appbar_elevation
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.Floating.Panel">
|
||||
<item name="android:background">?panel</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.PlacePage.EditText" parent="Widget.AppCompat.EditText">
|
||||
<style
|
||||
name="MwmWidget.PlacePage.EditText"
|
||||
parent="Widget.AppCompat.EditText">
|
||||
<item name="android:imeOptions">actionDone</item>
|
||||
<item name="android:textAppearance">@style/MwmTextAppearance.PlacePage</item>
|
||||
<item name="android:textColorHint">?secondary</item>
|
||||
<item name="android:textCursorDrawable">@null</item>
|
||||
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoRegular</item>
|
||||
<item name="android:fontFamily"
|
||||
tools:ignore="NewApi">@string/robotoRegular
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.ToolbarStyle" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<style
|
||||
name="MwmWidget.ToolbarStyle"
|
||||
parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:background">?colorPrimary</item>
|
||||
<item name="android:elevation" tools:ignore="NewApi">@dimen/appbar_elevation</item>
|
||||
<item name="android:elevation"
|
||||
tools:ignore="NewApi">@dimen/appbar_elevation
|
||||
</item>
|
||||
<item name="android:displayOptions">homeAsUp|showTitle</item>
|
||||
<item name="contentInsetStart">72dp</item>
|
||||
<item name="android:titleTextAppearance" tools:ignore="NewApi">@style/MwmTextAppearance.Toolbar.Title</item>
|
||||
<item name="android:titleTextAppearance"
|
||||
tools:ignore="NewApi">@style/MwmTextAppearance.Toolbar.Title
|
||||
</item>
|
||||
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
|
||||
<item name="contentInsetLeft">72dp</item>
|
||||
<item name="android:contentInsetStart" tools:ignore="NewApi">72dp</item>
|
||||
<item name="android:contentInsetLeft" tools:ignore="NewApi">72dp</item>
|
||||
<item name="android:contentInsetStart"
|
||||
tools:ignore="NewApi">72dp
|
||||
</item>
|
||||
<item name="android:contentInsetLeft"
|
||||
tools:ignore="NewApi">72dp
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.ToolbarStyle.Light">
|
||||
<item name="android:titleTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Toolbar.Title.Light</item>
|
||||
<item name="android:titleTextAppearance"
|
||||
tools:targetApi="lollipop">@style/MwmTextAppearance.Toolbar.Title.Light
|
||||
</item>
|
||||
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title.Light</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.ToolbarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<style
|
||||
name="MwmWidget.ToolbarTheme"
|
||||
parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.ToolbarTheme.Light" parent="ThemeOverlay.AppCompat.ActionBar">
|
||||
<style
|
||||
name="MwmWidget.ToolbarTheme.Light"
|
||||
parent="ThemeOverlay.AppCompat.ActionBar">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="colorAccent">@color/bg_window_night</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.ListView" parent="Widget.AppCompat.ListView">
|
||||
<style
|
||||
name="MwmWidget.ListView"
|
||||
parent="Widget.AppCompat.ListView">
|
||||
<item name="android:fadingEdge">none</item>
|
||||
<item name="android:divider">@color/divider</item>
|
||||
<item name="android:background">@null</item>
|
||||
|
@ -97,7 +125,8 @@
|
|||
<item name="android:cacheColorHint">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.TextView" parent="android:Widget.TextView">
|
||||
<style name="MwmWidget.TextView"
|
||||
parent="android:Widget.TextView">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
|
@ -166,7 +195,8 @@
|
|||
<item name="android:foreground">@drawable/shadow_top</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.RatingBar" parent="android:Widget.RatingBar">
|
||||
<style name="MwmWidget.RatingBar"
|
||||
parent="android:Widget.RatingBar">
|
||||
<item name="android:progressDrawable">@drawable/rating_bar</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/rating_bar</item>
|
||||
</style>
|
||||
|
@ -201,4 +231,14 @@
|
|||
<item name="android:padding">@dimen/margin_half</item>
|
||||
<item name="android:textAppearance">@style/MwmTextAppearance.Toolbar.Title.Button</item>
|
||||
</style>
|
||||
|
||||
<style
|
||||
name="MwmWidget.SearchNavigationButton"
|
||||
parent="android:Widget.ImageButton">
|
||||
<item name="android:scaleType">center</item>
|
||||
<item name="android:layout_height">44dp</item>
|
||||
<item name="android:layout_width">44dp</item>
|
||||
<item name="android:background">?selectableItemBackgroundBorderless</item>
|
||||
<item name="android:tint">?iconTint</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -73,5 +73,6 @@
|
|||
|
||||
<declare-styleable name="ThemeAttrs.Navigation">
|
||||
<attr name="newsMarker" format="reference"/>
|
||||
<attr name="searchLayoutBackground" format="reference"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
|
@ -135,14 +135,12 @@
|
|||
|
||||
<style name="MwmTheme.NavButtons">
|
||||
<item name="nav_background">@drawable/button_navigation_circle</item>
|
||||
<item name="searchLayoutBackground">@drawable/bg_circle_panel</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.NavButtons.Night" parent="MwmTheme.Night">
|
||||
<item name="nav_background">@drawable/button_navigation_circle_night</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.Button" parent="Base.Widget.AppCompat.Button">
|
||||
<item name="colorButtonNormal">?colorAccent</item>
|
||||
<item name="searchLayoutBackground">@drawable/bg_circle_panel_night</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.Navigation">
|
||||
|
|
Loading…
Add table
Reference in a new issue