Reputation: 20416
I noticed that this template is used by both messenger, hangout and other apps. How can I achieve the same result?
Upvotes: 0
Views: 674
Reputation: 13555
You need to make it custom for that
<uk.co.markormesher.android_fab.FloatingActionButton
android:id="@+id/fab"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
https://github.com/markormesher/android-fab
https://github.com/Scalified/fab
Upvotes: 1
Reputation: 1469
I have used a library for getting these layouts. This is part of the code that I have used. For more information about the library please go to this link.https://github.com/Clans/FloatingActionButton
myxml.xml
<com.github.clans.fab.FloatingActionMenu
android:id="@+id/menu_red"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:paddingRight="10dp"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
htext:menu_labels_ellipsize="end"
htext:menu_labels_singleLine="true"
htext:menu_backgroundColor="#ccffffff"
>
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fabphy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_star_big_on"
android:visibility="gone"
htext:fab_size="mini"
htext:fab_label="Load Physics" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fabche"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_star_big_on"
android:visibility="gone"
htext:fab_size="mini"
htext:fab_label="Load Chemistry" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fabmat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_star_big_on"
android:visibility="gone"
htext:fab_size="mini"
htext:fab_label="Load Maths" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fabgk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_star_big_on"
android:visibility="gone"
htext:fab_size="mini"
htext:fab_label="Load GK" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fabsd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/stat_notify_sdcard"
htext:fab_size="mini"
htext:fab_label="Load SD Card" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_menu_search"
htext:fab_size="mini"
htext:fab_label="Change folder" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_input_add"
htext:fab_size="mini"
android:visibility="gone"
htext:fab_label="Add file" />
</com.github.clans.fab.FloatingActionMenu>
Upvotes: 2