Skip to content

Commit 58ebe38

Browse files
committed
StateListDrawable added.
1 parent 9c05e50 commit 58ebe38

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

app/src/main/res/layout/activity_fab.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
android:layout_width="56dp"
1313
android:layout_height="56dp"
1414
android:layout_margin="16dp"
15-
android:layout_alignParentBottom="true"
16-
android:layout_alignParentRight="true"
15+
android:layout_centerInParent="true"
1716
android:elevation="4dp"
17+
android:foreground="@drawable/sl_state_drawable"
1818
app:radiusFactor="1">
1919

2020
<RelativeLayout
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true">
5+
<shape>
6+
<solid android:color="#80ffffff" />
7+
</shape>
8+
</item>
9+
10+
<item>
11+
<shape>
12+
<solid android:color="#00ffffff" />
13+
</shape>
14+
</item>
15+
16+
</selector>

0 commit comments

Comments
 (0)