mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-01-10 22:24:52 +01:00
add ripple only to sdk 21+
This commit is contained in:
parent
121fbdb490
commit
d9d571be69
6
app/src/main/res/drawable/button.xml
Normal file
6
app/src/main/res/drawable/button.xml
Normal 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>
|
6
app/src/main/res/drawable/button_pressed.xml
Normal file
6
app/src/main/res/drawable/button_pressed.xml
Normal 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>
|
9
app/src/main/res/values-v21/styles.xml
Normal file
9
app/src/main/res/values-v21/styles.xml
Normal 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>
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user