add ripple only to sdk 21+

This commit is contained in:
tibbi 2016-03-21 21:36:58 +01:00
parent 121fbdb490
commit d9d571be69
4 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/button_pressed"
android:state_pressed="true"/>
</selector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="@color/dark_grey_pressed_mask"/>
</shape>

View File

@ -0,0 +1,9 @@
<resources>
<style name="MyButton" parent="Widget.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:textSize">@dimen/button_text_size</item>
</style>
</resources>

View File

@ -9,7 +9,7 @@
<style name="MyButton" parent="Widget.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:background">@drawable/button</item>
<item name="android:textSize">@dimen/button_text_size</item>
</style>