New selectors and backrounds for clickable items.

This commit is contained in:
Dmitry Yunitsky 2014-12-08 13:02:24 +03:00 committed by Alex Zolotarev
parent c959929218
commit fafbed758e
31 changed files with 281 additions and 118 deletions

View file

@ -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"/>

View file

@ -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>

View file

@ -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>

View file

@ -1,8 +1,5 @@
<?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"/>

View file

@ -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>

View file

@ -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"/>

View file

@ -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>

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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">

View file

@ -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

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"/>

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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">

View file

@ -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;

View file

@ -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
{