add ripple effect to 21+

This commit is contained in:
tibbi 2016-03-21 23:23:37 +01:00
parent 5d1f131b8e
commit bbd3d41a6b
5 changed files with 15 additions and 33 deletions

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
<size
android:width="80dp"
android:height="80dp"/>
</shape>
</item>
</ripple>

View File

@ -1,13 +0,0 @@
<?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/lightGrey"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
</shape>
</item>
</selector>

View File

@ -7,14 +7,12 @@
<ImageView
android:id="@+id/left_arrow"
style="@style/ArrowStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/table_month"
android:layout_alignTop="@+id/table_month"
android:background="@drawable/ripple"
android:paddingBottom="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:padding="@dimen/activity_margin"
android:src="@mipmap/arrow_left"/>
<TextView
@ -30,15 +28,13 @@
<ImageView
android:id="@+id/right_arrow"
style="@style/ArrowStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/table_month"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/table_month"
android:background="@drawable/ripple"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:padding="@dimen/activity_margin"
android:src="@mipmap/arrow_right"/>
<LinearLayout

View File

@ -0,0 +1,7 @@
<resources>
<style name="ArrowStyle">
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
</style>
</resources>

View File

@ -18,6 +18,10 @@
<item name="android:windowShowWallpaper">true</item>
</style>
<style name="ArrowStyle">
<item name="android:background">@drawable/button</item>
</style>
<style name="MyButton" parent="Widget.AppCompat.Button">
<item name="android:textColor">@android:color/white</item>
<item name="background">@drawable/button</item>