Widget wasn't working

Apparently, selectableItemBackground is not available in widget layouts
This commit is contained in:
daniel oeh 2014-11-19 16:36:18 +01:00
parent 7aff9dc3aa
commit 9588747edd
2 changed files with 15 additions and 2 deletions

View File

@ -16,7 +16,7 @@
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_margin="12dp"
android:background="?attr/selectableItemBackground"
android:background="@drawable/borderless_button_dark"
android:src="@drawable/ic_play_arrow_white_24dp" />
<LinearLayout
@ -25,7 +25,7 @@
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/butPlay"
android:background="?attr/selectableItemBackground"
android:background="@drawable/borderless_button_dark"
android:gravity="center_vertical"
android:orientation="vertical" >

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/selection_background_color_dark" />
</shape></item>
<item android:state_focused="true"><shape android:shape="rectangle">
<solid android:color="@color/selection_background_color_dark" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@android:color/transparent" />
</shape></item>
</selector>