This commit is contained in:
Sergey Solovyev 2012-10-05 23:50:58 +04:00
parent 641ae8cc45
commit 31c5551b4e
6 changed files with 49 additions and 27 deletions

View File

@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:a="http://schemas.android.com/apk/res/android">
<!-- pressed --> <!-- Non focused states -->
<item android:state_pressed="true" <item a:state_focused="false" a:state_selected="false" a:state_pressed="false" a:drawable="@android:color/transparent" />
android:drawable="@color/metro_blue_color"/> <item a:state_focused="false" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_blue_color" />
<!-- focused --> <!-- Focused states -->
<item android:state_focused="true" <item a:state_focused="true" a:state_selected="false" a:state_pressed="false" a:drawable="@color/metro_blue_color" />
android:drawable="@color/metro_blue_color"/> <item a:state_focused="true" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_blue_color" />
<!-- default --> <!-- Pressed -->
<item android:drawable="@android:color/transparent"/> <!-- Non focused states -->
<item a:state_focused="false" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_blue_color" />
<item a:state_focused="false" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_blue_color" />
<!-- Focused states -->
<item a:state_focused="true" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_blue_color" />
<item a:state_focused="true" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_blue_color" />
</selector> </selector>

View File

@ -1,15 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:a="http://schemas.android.com/apk/res/android">
<!-- pressed --> <!-- Non focused states -->
<item android:state_pressed="true" <item a:state_focused="false" a:state_selected="false" a:state_pressed="false" a:drawable="@android:color/transparent" />
android:drawable="@color/metro_green_color"/> <item a:state_focused="false" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_green_color" />
<!-- focused --> <!-- Focused states -->
<item android:state_focused="true" <item a:state_focused="true" a:state_selected="false" a:state_pressed="false" a:drawable="@color/metro_green_color" />
android:drawable="@color/metro_green_color"/> <item a:state_focused="true" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_green_color" />
<!-- Pressed -->
<!-- Non focused states -->
<item a:state_focused="false" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_green_color" />
<item a:state_focused="false" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_green_color" />
<!-- Focused states -->
<item a:state_focused="true" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_green_color" />
<item a:state_focused="true" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_green_color" />
<!-- default -->
<item android:drawable="@android:color/transparent"/>
</selector> </selector>

View File

@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:a="http://schemas.android.com/apk/res/android">
<!-- pressed --> <!-- Non focused states -->
<item android:state_pressed="true" <item a:state_focused="false" a:state_selected="false" a:state_pressed="false" a:drawable="@android:color/transparent" />
android:drawable="@color/metro_purple_color"/> <item a:state_focused="false" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_purple_color" />
<!-- focused --> <!-- Focused states -->
<item android:state_focused="true" <item a:state_focused="true" a:state_selected="false" a:state_pressed="false" a:drawable="@color/metro_purple_color" />
android:drawable="@color/metro_purple_color"/> <item a:state_focused="true" a:state_selected="true" a:state_pressed="false" a:drawable="@color/metro_purple_color" />
<!-- default --> <!-- Pressed -->
<item android:drawable="@android:color/transparent"/> <!-- Non focused states -->
<item a:state_focused="false" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_purple_color" />
<item a:state_focused="false" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_purple_color" />
<!-- Focused states -->
<item a:state_focused="true" a:state_selected="false" a:state_pressed="true" a:drawable="@color/metro_purple_color" />
<item a:state_focused="true" a:state_selected="true" a:state_pressed="true" a:drawable="@color/metro_purple_color" />
</selector> </selector>

View File

@ -17,6 +17,7 @@
</style> </style>
<style name="metro_blue_fragment_list_view_item_style" parent="default_fragment_list_view_item_style"> <style name="metro_blue_fragment_list_view_item_style" parent="default_fragment_list_view_item_style">
<item name="background">@drawable/metro_blue_list_item</item>
<item name="android:background">@drawable/metro_blue_list_item</item> <item name="android:background">@drawable/metro_blue_list_item</item>
</style> </style>

View File

@ -17,6 +17,7 @@
</style> </style>
<style name="metro_green_fragment_list_view_item_style" parent="default_fragment_list_view_item_style"> <style name="metro_green_fragment_list_view_item_style" parent="default_fragment_list_view_item_style">
<item name="background">@drawable/metro_green_list_item</item>
<item name="android:background">@drawable/metro_green_list_item</item> <item name="android:background">@drawable/metro_green_list_item</item>
</style> </style>

View File

@ -17,6 +17,7 @@
</style> </style>
<style name="metro_purple_fragment_list_view_item_style" parent="default_fragment_list_view_item_style"> <style name="metro_purple_fragment_list_view_item_style" parent="default_fragment_list_view_item_style">
<item name="background">@drawable/metro_purple_list_item</item>
<item name="android:background">@drawable/metro_purple_list_item</item> <item name="android:background">@drawable/metro_purple_list_item</item>
</style> </style>