diff options
author | Dmitry Yunitsky <yunik@mapswithme.com> | 2014-12-08 13:02:24 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:34:35 +0300 |
commit | fafbed758ea44016e8bcb6706339d505849ceb1b (patch) | |
tree | 2e06b94dd23238888167a156df7b90567fbab35c | |
parent | c9599292187af77cd789bd9a5d22888ee444d6ee (diff) |
New selectors and backrounds for clickable items.
31 files changed, 281 insertions, 118 deletions
diff --git a/android/res/drawable/bg_bottom_btn_selector.xml b/android/res/drawable/bg_bottom_btn_selector.xml index 87ca562eb8..3f98a2b91c 100644 --- a/android/res/drawable/bg_bottom_btn_selector.xml +++ b/android/res/drawable/bg_bottom_btn_selector.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- FIXME --> <item android:drawable="@drawable/bg_bottom_btn_active" android:state_pressed="true"/> <item android:drawable="@drawable/bg_bottom_btn"/> diff --git a/android/res/drawable/bg_toolbar_button_selector.xml b/android/res/drawable/bg_toolbar_button_selector.xml deleted file mode 100644 index 5dd04b9874..0000000000 --- a/android/res/drawable/bg_toolbar_button_selector.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:drawable="@color/bg_bottom_toolbar_pressed" android:state_pressed="true"/> - <item android:drawable="@android:color/white"/> - -</selector>
\ No newline at end of file diff --git a/android/res/drawable/default_selector.xml b/android/res/drawable/default_selector.xml new file mode 100644 index 0000000000..adc1c75b5a --- /dev/null +++ b/android/res/drawable/default_selector.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" + android:exitFadeDuration="@android:integer/config_shortAnimTime"> + <item android:drawable="@android:color/darker_gray" + android:state_pressed="true"/> + <item android:drawable="@android:color/transparent"/> +</selector>
\ No newline at end of file diff --git a/android/res/drawable/ic_bookmarks_toggle_bg.xml b/android/res/drawable/ic_bookmarks_toggle_bg.xml index 482935a94f..69613a3545 100644 --- a/android/res/drawable/ic_bookmarks_toggle_bg.xml +++ b/android/res/drawable/ic_bookmarks_toggle_bg.xml @@ -1,9 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:id="@android:id/background" - android:drawable="@android:color/transparent"/> - <item android:id="@android:id/toggle" android:drawable="@drawable/ic_bookmarks_selector"/> </layer-list>
\ No newline at end of file diff --git a/android/res/layout-land/info_box.xml b/android/res/layout-land/info_box.xml index 68061b835d..ae0b4550f6 100644 --- a/android/res/layout-land/info_box.xml +++ b/android/res/layout-land/info_box.xml @@ -34,7 +34,7 @@ android:layout_gravity="center_vertical" android:layout_weight="0" android:alpha="@dimen/alpha_edit_button" - android:background="@android:color/transparent" + android:background="?attr/clickableBackground" android:padding="@dimen/margin_tiny" android:src="@drawable/ic_place_page_edit_button"/> @@ -56,6 +56,7 @@ android:layout_width="@dimen/ppp_button_size" android:layout_height="@dimen/ppp_button_size_small" android:layout_gravity="center" + android:background="?attr/clickableBackground" android:scaleType="center" android:src="@drawable/ic_drive"/> @@ -71,10 +72,8 @@ <ToggleButton android:id="@+id/info_box_is_bookmarked" style="@style/bookmarkToggleButton" - android:layout_width="@dimen/ppp_button_size" - android:layout_height="@dimen/ppp_button_size_small" android:layout_weight="0" - android:background="@drawable/ic_bookmarks_toggle_bg"/> + android:layout_height="@dimen/ppp_button_size_small"/> </LinearLayout> diff --git a/android/res/layout-sw600dp/download_item_placeholder.xml b/android/res/layout-sw600dp/download_item_placeholder.xml new file mode 100644 index 0000000000..7d7888d520 --- /dev/null +++ b/android/res/layout-sw600dp/download_item_placeholder.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<View xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/margin_medium" + android:background="@android:color/transparent"/> diff --git a/android/res/layout-sw600dp/fragment_downloader.xml b/android/res/layout-sw600dp/fragment_downloader.xml new file mode 100644 index 0000000000..db1d129ff0 --- /dev/null +++ b/android/res/layout-sw600dp/fragment_downloader.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/transparent" + android:orientation="vertical"> + + <android.support.v7.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="@dimen/search_box_height" + android:layout_marginBottom="@dimen/margin_small" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" + app:theme="@style/MyActionBar"> + + <TextView + android:id="@+id/tv__update_all" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center_vertical|right" + android:gravity="center_vertical" + android:paddingRight="@dimen/margin_small" + android:text="@string/downloader_update_all" + android:textAllCaps="true" + android:textColor="@android:color/white" + android:textSize="18sp"/> + </android.support.v7.widget.Toolbar> + + <ListView + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:animationCache="false" + android:background="@android:color/white" + android:cacheColorHint="@android:color/transparent" + android:scrollingCache="false"/> +</LinearLayout> diff --git a/android/res/layout-sw600dp/fragment_search.xml b/android/res/layout-sw600dp/fragment_search.xml index 5745134f6e..a1f425e4c8 100644 --- a/android/res/layout-sw600dp/fragment_search.xml +++ b/android/res/layout-sw600dp/fragment_search.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="vertical"> <include @@ -16,6 +16,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/margin_small" android:animationCache="false" + android:background="@android:color/white" android:divider="@color/divider_search" android:dividerHeight="1px" android:scrollbarStyle="outsideOverlay" diff --git a/android/res/layout-sw600dp/info_box.xml b/android/res/layout-sw600dp/info_box.xml index cd7e431c08..9b694c644c 100644 --- a/android/res/layout-sw600dp/info_box.xml +++ b/android/res/layout-sw600dp/info_box.xml @@ -43,7 +43,7 @@ android:layout_marginLeft="-32dp" android:layout_toRightOf="@id/info_title" android:alpha="@dimen/alpha_edit_button" - android:background="@android:color/transparent" + android:background="?attr/clickableBackground" android:padding="@dimen/margin_tiny" android:src="@drawable/ic_place_page_edit_button"/> @@ -67,6 +67,7 @@ android:layout_width="@dimen/ppp_button_size" android:layout_height="@dimen/ppp_button_size" android:layout_gravity="center" + android:background="?attr/clickableBackground" android:scaleType="center" android:src="@drawable/ic_drive"/> @@ -82,10 +83,7 @@ <ToggleButton android:id="@+id/info_box_is_bookmarked" style="@style/bookmarkToggleButton" - android:layout_width="@dimen/ppp_button_size" - android:layout_height="@dimen/ppp_button_size" - android:layout_weight="0" - android:background="@drawable/ic_bookmarks_toggle_bg"/> + android:layout_weight="0"/> </LinearLayout> <RelativeLayout diff --git a/android/res/layout-sw600dp/map.xml b/android/res/layout-sw600dp/map.xml index 6ec3cc0b1a..28fe76f2ce 100644 --- a/android/res/layout-sw600dp/map.xml +++ b/android/res/layout-sw600dp/map.xml @@ -35,6 +35,7 @@ android:id="@+id/tv__routing_go" android:layout_width="wrap_content" android:layout_height="match_parent" + android:background="?attr/clickableBackground" android:gravity="bottom" android:includeFontPadding="false" android:paddingBottom="10dp" @@ -60,6 +61,7 @@ android:layout_height="@dimen/routing_button_height" android:layout_alignParentRight="true" android:layout_centerVertical="true" + android:background="?attr/clickableBackground" android:padding="@dimen/margin_medium" android:scaleType="center" android:src="@drawable/ic_close_routing"/> @@ -81,7 +83,7 @@ android:id="@+id/layout__turn_instructions" layout="@layout/map_turn_instructions" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/routing_pp_height" android:visibility="gone"/> <include diff --git a/android/res/layout-sw600dp/map_bottom_vertical_toolbar.xml b/android/res/layout-sw600dp/map_bottom_vertical_toolbar.xml index 7ff233f170..8a08936eb5 100644 --- a/android/res/layout-sw600dp/map_bottom_vertical_toolbar.xml +++ b/android/res/layout-sw600dp/map_bottom_vertical_toolbar.xml @@ -10,6 +10,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="@dimen/search_box_height" + android:layout_marginBottom="@dimen/margin_small" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:theme="@style/MyActionBar"/> @@ -19,46 +20,88 @@ android:layout_height="@dimen/bottom_item_height" android:visibility="gone"/> - <TextView - android:id="@+id/btn_download_maps" + <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_download" - android:drawablePadding="@dimen/margin_small" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:text="@string/download_maps" - android:textColor="@color/text_menu"/> + android:background="@android:color/white"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_download" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_download_maps" + android:layout_width="match_parent" + android:layout_height="@dimen/bottom_item_height" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/download_maps" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + + </RelativeLayout> <View style="@style/drawerSeparatorMediumPadded"/> - <TextView - android:id="@+id/btn_settings" + <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_settings" - android:drawablePadding="@dimen/margin_small" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:text="@string/settings_and_more" - android:textColor="@color/text_menu"/> + android:background="@android:color/white"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_settings" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_settings" + android:layout_width="match_parent" + android:layout_height="@dimen/bottom_item_height" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/settings_and_more" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + + </RelativeLayout> <View style="@style/drawerSeparatorMediumPadded"/> - <TextView - android:id="@+id/btn_share" + <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_send_my_location" - android:drawablePadding="@dimen/margin_small" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:text="@string/share_my_location" - android:textColor="@color/text_menu"/> + android:background="@android:color/white"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_send_my_location" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_share" + android:layout_width="match_parent" + android:layout_height="@dimen/bottom_item_height" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/share_my_location" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + + </RelativeLayout> </LinearLayout> diff --git a/android/res/layout/download_item_country.xml b/android/res/layout/download_item_country.xml index cf1a181547..adb219ec5f 100644 --- a/android/res/layout/download_item_country.xml +++ b/android/res/layout/download_item_country.xml @@ -3,6 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:wheel="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" + android:addStatesFromChildren="true" + android:background="?attr/clickableBackground" android:layout_height="match_parent" android:minHeight="?android:attr/listPreferredItemHeight"> diff --git a/android/res/layout/download_item_extended.xml b/android/res/layout/download_item_extended.xml index 3fd7a5a7be..5dc77bfed7 100644 --- a/android/res/layout/download_item_extended.xml +++ b/android/res/layout/download_item_extended.xml @@ -2,6 +2,8 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:addStatesFromChildren="true" + android:background="?attr/clickableBackground" android:minHeight="?android:attr/listPreferredItemHeight"> <TextView diff --git a/android/res/layout/download_item_group.xml b/android/res/layout/download_item_group.xml index 9731024961..4c4d5f51a1 100644 --- a/android/res/layout/download_item_group.xml +++ b/android/res/layout/download_item_group.xml @@ -1,27 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:background="@null" - android:minHeight="?android:attr/listPreferredItemHeight" > + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:addStatesFromChildren="true" + android:background="?attr/clickableBackground" + android:minHeight="?android:attr/listPreferredItemHeight"> - <TextView - android:id="@+id/title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_marginLeft="@dimen/margin_small" - android:textAppearance="@style/TextAppearance.AppCompat.Large" /> + <TextView + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_marginLeft="@dimen/margin_small" + android:textAppearance="@style/TextAppearance.AppCompat.Large"/> - <ImageView - android:id="@+id/disclosure_image" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:paddingLeft="@dimen/dp_x_3" - android:paddingRight="@dimen/dp_x_3" - android:src="@drawable/ic_next_item" /> + <ImageView + android:id="@+id/disclosure_image" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:paddingLeft="@dimen/dp_x_3" + android:paddingRight="@dimen/dp_x_3" + android:src="@drawable/ic_next_item"/> </RelativeLayout>
\ No newline at end of file diff --git a/android/res/layout/fragment_search.xml b/android/res/layout/fragment_search.xml index cd168629e6..51a0491aa0 100644 --- a/android/res/layout/fragment_search.xml +++ b/android/res/layout/fragment_search.xml @@ -2,6 +2,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@android:color/white" android:orientation="vertical"> <include diff --git a/android/res/layout/info_box.xml b/android/res/layout/info_box.xml index ba2cff7a79..648ebb98df 100644 --- a/android/res/layout/info_box.xml +++ b/android/res/layout/info_box.xml @@ -43,7 +43,7 @@ android:layout_marginLeft="-32dp" android:layout_toRightOf="@id/info_title" android:alpha="@dimen/alpha_edit_button" - android:background="@android:color/transparent" + android:background="?attr/clickableBackground" android:padding="@dimen/margin_tiny" android:src="@drawable/ic_place_page_edit_button"/> @@ -67,6 +67,7 @@ android:layout_width="@dimen/ppp_button_size" android:layout_height="@dimen/ppp_button_size" android:layout_gravity="center" + android:background="?attr/clickableBackground" android:scaleType="center" android:src="@drawable/ic_drive"/> @@ -82,10 +83,7 @@ <ToggleButton android:id="@+id/info_box_is_bookmarked" style="@style/bookmarkToggleButton" - android:layout_width="@dimen/ppp_button_size" - android:layout_height="@dimen/ppp_button_size" - android:layout_weight="0" - android:background="@drawable/ic_bookmarks_toggle_bg"/> + android:layout_weight="0"/> </LinearLayout> <RelativeLayout diff --git a/android/res/layout/item_bottom_toolbar.xml b/android/res/layout/item_bottom_toolbar.xml index 4551c6826e..3d2e6827b6 100644 --- a/android/res/layout/item_bottom_toolbar.xml +++ b/android/res/layout/item_bottom_toolbar.xml @@ -3,7 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_toolbar_button_selector"> + android:background="?attr/clickableBackground"> <ImageView android:id="@+id/iv__bottom_icon" diff --git a/android/res/layout/map.xml b/android/res/layout/map.xml index 3e70bf7a8f..c96a41c5c5 100644 --- a/android/res/layout/map.xml +++ b/android/res/layout/map.xml @@ -41,6 +41,7 @@ android:id="@+id/tv__routing_go" android:layout_width="wrap_content" android:layout_height="match_parent" + android:background="?attr/clickableBackground" android:gravity="bottom" android:includeFontPadding="false" android:paddingBottom="10dp" @@ -66,6 +67,7 @@ android:layout_height="@dimen/routing_button_height" android:layout_alignParentRight="true" android:layout_centerVertical="true" + android:background="?attr/clickableBackground" android:padding="@dimen/margin_medium" android:scaleType="center" android:src="@drawable/ic_close_routing"/> diff --git a/android/res/layout/map_bottom_vertical_toolbar.xml b/android/res/layout/map_bottom_vertical_toolbar.xml index a5a45999ae..4788489031 100644 --- a/android/res/layout/map_bottom_vertical_toolbar.xml +++ b/android/res/layout/map_bottom_vertical_toolbar.xml @@ -12,46 +12,84 @@ android:layout_height="@dimen/bottom_item_height" android:visibility="gone"/> - <TextView - android:id="@+id/btn_download_maps" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_download" - android:drawablePadding="@dimen/margin_small" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:text="@string/download_maps" - android:textColor="@color/text_menu"/> + android:layout_height="@dimen/bottom_item_height"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_download" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_download_maps" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/download_maps" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + + </RelativeLayout> <View style="@style/drawerSeparatorMediumPadded"/> - <TextView - android:id="@+id/btn_settings" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_settings" - android:drawablePadding="@dimen/margin_small" - android:gravity="center_vertical" - android:paddingLeft="10dp" - android:text="@string/settings_and_more" - android:textColor="@color/text_menu"/> + android:layout_height="@dimen/bottom_item_height"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_settings" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_settings" + android:layout_width="match_parent" + android:layout_height="@dimen/bottom_item_height" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/settings_and_more" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + + </RelativeLayout> <View style="@style/drawerSeparatorMediumPadded"/> - <TextView - android:id="@+id/btn_share" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="@dimen/bottom_item_height" - android:background="@drawable/bg_toolbar_button_selector" - android:drawableLeft="@drawable/ic_menu_send_my_location" - android:gravity="center_vertical" - android:drawablePadding="@dimen/margin_small" - android:paddingLeft="10dp" - android:text="@string/share_my_location" - android:textColor="@color/text_menu"/> + android:layout_height="@dimen/bottom_item_height"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/margin_medium" + android:background="@drawable/ic_menu_send_my_location" + android:scaleType="center"/> + + <TextView + android:id="@+id/btn_share" + android:layout_width="match_parent" + android:layout_height="@dimen/bottom_item_height" + android:background="?attr/clickableBackground" + android:fontFamily="@string/robotoLight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/margin_large_and_half" + android:text="@string/share_my_location" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textColor="@color/text_menu"/> + </RelativeLayout> </LinearLayout> diff --git a/android/res/layout/map_turn_instructions.xml b/android/res/layout/map_turn_instructions.xml index 1a71a6a2c4..5a5c4a03b3 100644 --- a/android/res/layout/map_turn_instructions.xml +++ b/android/res/layout/map_turn_instructions.xml @@ -3,7 +3,7 @@ android:id="@+id/navigation_buttons_container" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/routing_pp_height" android:background="@color/bg_top_panels"> <TextView @@ -48,11 +48,12 @@ <ImageView android:id="@+id/btn__close" - android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_width="@dimen/routing_button_height" + android:layout_height="@dimen/routing_button_height" + android:layout_alignParentBottom="true" android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:layout_marginRight="@dimen/margin_medium" - android:background="@drawable/ic_close_routing"/> + android:background="?attr/clickableBackground" + android:scaleType="center" + android:src="@drawable/ic_close_routing"/> </RelativeLayout> diff --git a/android/res/layout/search_box.xml b/android/res/layout/search_box.xml index c173f68d99..8dd4d3527e 100644 --- a/android/res/layout/search_box.xml +++ b/android/res/layout/search_box.xml @@ -38,6 +38,8 @@ android:layout_weight="1" android:background="@null" android:fontFamily="@string/robotoLight" + android:hint="@string/search" + android:textColorHint="@color/text_hint_search_box" android:imeOptions="actionSearch|flagNoExtractUi" android:inputType="text" android:padding="@dimen/margin_tiny" diff --git a/android/res/layout/search_category_item.xml b/android/res/layout/search_category_item.xml index 4788e9c7f7..a53e3b9d6d 100644 --- a/android/res/layout/search_category_item.xml +++ b/android/res/layout/search_category_item.xml @@ -2,7 +2,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_toolbar_button_selector" android:gravity="center_vertical" android:minHeight="@dimen/search_item_height" android:orientation="horizontal" diff --git a/android/res/layout/search_item.xml b/android/res/layout/search_item.xml index a10d55eb90..9f31a6fce0 100644 --- a/android/res/layout/search_item.xml +++ b/android/res/layout/search_item.xml @@ -4,7 +4,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_toolbar_button_selector" android:gravity="top" android:minHeight="@dimen/search_item_height" android:orientation="horizontal" diff --git a/android/res/layout/search_message_item.xml b/android/res/layout/search_message_item.xml index cbb3cb1c25..b7a15808c8 100644 --- a/android/res/layout/search_message_item.xml +++ b/android/res/layout/search_message_item.xml @@ -2,7 +2,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_search_item_green_selector" android:gravity="center_vertical" android:minHeight="@dimen/search_item_height" android:orientation="horizontal" diff --git a/android/res/values-v11/styles.xml b/android/res/values-v11/styles.xml new file mode 100644 index 0000000000..10a2c0c85d --- /dev/null +++ b/android/res/values-v11/styles.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + + <style name="MWMMain" parent="@style/AppTheme"> + <item name="clickableBackground">?android:attr/selectableItemBackground</item> + </style> + + <style name="MWMMain.NoBar" parent="Theme.AppCompat.Light.NoActionBar"> + <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> + <item name="clickableBackground">?android:attr/selectableItemBackground</item> + </style> + + <style name="MwmSearch" parent="@style/MWMMain"> + <item name="android:windowNoTitle">true</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:windowBackground">@color/semitransparent_black</item> + <item name="android:colorBackgroundCacheHint">@null</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowAnimationStyle">@android:style/Animation</item> + <item name="clickableBackground">?android:attr/selectableItemBackground</item> + </style> +</resources>
\ No newline at end of file diff --git a/android/res/values/attrs.xml b/android/res/values/attrs.xml index fa1093117d..5407870d92 100644 --- a/android/res/values/attrs.xml +++ b/android/res/values/attrs.xml @@ -4,5 +4,7 @@ <attr name="progressColor" format="color"/> <attr name="secondaryColor" format="color"/> <attr name="wheelThickness" format="dimension"/> + + <attr name="clickableBackground" format="reference"/> </declare-styleable> </resources>
\ No newline at end of file diff --git a/android/res/values/colors.xml b/android/res/values/colors.xml index dfbadcc712..632537d4f6 100644 --- a/android/res/values/colors.xml +++ b/android/res/values/colors.xml @@ -32,6 +32,7 @@ <!-- search --> <color name="text_search_box">@android:color/white</color> + <color name="text_hint_search_box">#bdffffff</color> <color name="text_search_item">@android:color/black</color> <color name="text_search_item_greyed">@android:color/darker_gray</color> <color name="text_search_category">@android:color/black</color> diff --git a/android/res/values/dimens.xml b/android/res/values/dimens.xml index a1cf30fcb3..f71a5274b7 100644 --- a/android/res/values/dimens.xml +++ b/android/res/values/dimens.xml @@ -15,6 +15,7 @@ <dimen name="margin_small_and_half">12dp</dimen> <dimen name="margin_medium">16dp</dimen> <dimen name="margin_large">32dp</dimen> + <dimen name="margin_large_and_half">48dp</dimen> <dimen name="neg_margin_micro">-2dp</dimen> <dimen name="neg_margin_tiny">-4dp</dimen> diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml index ca5bd736ec..3ad715f7bb 100644 --- a/android/res/values/styles.xml +++ b/android/res/values/styles.xml @@ -48,10 +48,13 @@ <item name="colorAccent">@color/downloader_red</item> </style> - <style name="MWMMain" parent="@style/AppTheme"/> + <style name="MWMMain" parent="@style/AppTheme"> + <item name="clickableBackground">@drawable/default_selector</item> + </style> <style name="MWMMain.NoBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> + <item name="clickableBackground">@drawable/default_selector</item> </style> <style name="MwmSearch" parent="@style/MWMMain"> @@ -61,6 +64,7 @@ <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowAnimationStyle">@android:style/Animation</item> + <item name="clickableBackground">@drawable/default_selector</item> </style> <style name="MWMTheme.Dialog.Light" parent="@style/MWMMain"> @@ -124,9 +128,14 @@ </style> <style name="bookmarkToggleButton" parent="Widget.AppCompat.CompoundButton.Switch"> + <item name="android:paddingTop">14dp</item> + <item name="android:drawableTop">@drawable/ic_bookmarks_selector</item> + <item name="android:layout_width">@dimen/ppp_button_size</item> + <item name="android:layout_height">@dimen/ppp_button_size</item> <item name="android:buttonStyleToggle">@style/Widget.Button.Toggle</item> <item name="android:textOn"/> <item name="android:textOff"/> + <item name="android:background">?attr/clickableBackground</item> </style> <style name="MyActionBar" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> diff --git a/android/src/com/mapswithme/country/ExtendedDownloadAdapterWrapper.java b/android/src/com/mapswithme/country/ExtendedDownloadAdapterWrapper.java index f515168115..eb8338a085 100644 --- a/android/src/com/mapswithme/country/ExtendedDownloadAdapterWrapper.java +++ b/android/src/com/mapswithme/country/ExtendedDownloadAdapterWrapper.java @@ -10,8 +10,8 @@ import com.mapswithme.maps.R; public class ExtendedDownloadAdapterWrapper extends DownloadAdapter { - protected static final int EXTENDED_VIEWS_COUNT = 3; // 3 more views at the top of baseadapter - protected static final int DOWNLOADED_ITEM_POSITION = 1; + protected static final int EXTENDED_VIEWS_COUNT = 2; // 3 more views at the top of baseadapter + protected static final int DOWNLOADED_ITEM_POSITION = 0; protected static final int EXTENDED_VIEW_TYPE_COUNT = 2; // one for placeholder, other for downloader view protected static final int TYPE_PLACEHOLDER = 5; protected static final int TYPE_EXTENDED = 6; diff --git a/android/src/com/mapswithme/maps/search/SearchAdapter.java b/android/src/com/mapswithme/maps/search/SearchAdapter.java index 846ea7ee73..1719b730b1 100644 --- a/android/src/com/mapswithme/maps/search/SearchAdapter.java +++ b/android/src/com/mapswithme/maps/search/SearchAdapter.java @@ -223,7 +223,7 @@ public class SearchAdapter extends BaseAdapter country = r.mCountry; dist = r.mDistance; UiUtils.hide(holder.mImageLeft); - holder.mView.setBackgroundResource(R.drawable.bg_toolbar_button_selector); + holder.mView.setBackgroundResource(0); } else { |