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

Skip to content

Commit 5204feb

Browse files
committed
Add magic buttons in example layout
1 parent 7140edc commit 5204feb

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed
Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,59 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:orientation="vertical"
8+
xmlns:app="http://schemas.android.com/apk/res-auto"
79
android:paddingBottom="@dimen/activity_vertical_margin"
810
android:paddingLeft="@dimen/activity_horizontal_margin"
911
android:paddingRight="@dimen/activity_horizontal_margin"
1012
android:paddingTop="@dimen/activity_vertical_margin"
11-
tools:context="br.com.bloder.magicbutton.MainActivity">
13+
tools:context="br.com.bloder.magicbutton.MainActivity"
14+
android:gravity="center_vertical"
15+
android:layout_marginBottom="60dp"
16+
android:layout_marginLeft="50dp">
1217

13-
<TextView
18+
<br.com.bloder.magic.view.MagicButton
19+
android:id="@+id/magic_button_github"
1420
android:layout_width="wrap_content"
1521
android:layout_height="wrap_content"
16-
android:text="Hello World!"/>
17-
</RelativeLayout>
22+
android:layout_marginTop="10dp"
23+
android:layout_marginLeft="10dp"
24+
app:magic_button_size="50dp"
25+
app:button_icon="@drawable/github"
26+
app:button_icon_width="25dp"
27+
app:button_icon_height="25dp"
28+
app:hide_text="Github"
29+
app:icon_button_color="#464646"
30+
app:expandable_area_color="#1c1e21"/>
31+
32+
<br.com.bloder.magic.view.MagicButton
33+
android:id="@+id/magic_button_facebook"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_marginTop="30dp"
37+
android:layout_marginLeft="10dp"
38+
app:magic_button_size="50dp"
39+
app:button_icon="@drawable/fb_white"
40+
app:button_icon_width="25dp"
41+
app:button_icon_height="25dp"
42+
app:hide_text="Facebook"
43+
app:icon_button_color="#365899"
44+
app:expandable_area_color="#203763"/>
45+
46+
<br.com.bloder.magic.view.MagicButton
47+
android:id="@+id/magic_button_twitter"
48+
android:layout_width="wrap_content"
49+
android:layout_height="wrap_content"
50+
android:layout_marginTop="30dp"
51+
android:layout_marginLeft="10dp"
52+
app:magic_button_size="50dp"
53+
app:button_icon="@drawable/twitter"
54+
app:button_icon_width="25dp"
55+
app:button_icon_height="25dp"
56+
app:hide_text="Twitter"
57+
app:icon_button_color="#ced0d4"
58+
app:expandable_area_color="#2f83de"/>
59+
</LinearLayout>

0 commit comments

Comments
 (0)