Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7140edc

Browse files
committed
Add magic button view
1 parent 1e927f2 commit 7140edc

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent">
6+
7+
<RelativeLayout android:layout_width="wrap_content"
8+
android:layout_height="wrap_content">
9+
10+
<LinearLayout
11+
android:id="@+id/expandable_button"
12+
android:layout_width="50dp"
13+
android:layout_height="50dp"
14+
android:background="@drawable/magic_button_bg"
15+
android:orientation="horizontal"
16+
android:animateLayoutChanges="true">
17+
18+
<TextView
19+
android:id="@+id/btn_text"
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent"
22+
android:layout_marginLeft="10dp"
23+
android:gravity="center_horizontal|center_vertical"
24+
android:visibility="gone"
25+
android:textColor="@android:color/white"/>
26+
27+
</LinearLayout>
28+
29+
<LinearLayout
30+
android:id="@+id/icon_button"
31+
android:layout_width="50dp"
32+
android:layout_height="50dp"
33+
android:background="@drawable/magic_button_bg"
34+
android:orientation="horizontal"
35+
android:animateLayoutChanges="true">
36+
37+
<ImageView
38+
android:id="@+id/btn_icon"
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
android:layout_marginLeft="12dp"
42+
android:layout_gravity="center"/>
43+
44+
</LinearLayout>
45+
46+
</RelativeLayout>
47+
48+
</LinearLayout>

0 commit comments

Comments
 (0)