/FloatingActionButtonExample

A super simple example for floating action button

Primary LanguageJava

FloatingActionButtonExample

A super simple example for floating action button
alt tag
For the ease of learning material design, I try to make it as simple as possible, just a floating action button with on click listener.
Have fun

#Library
compile 'com.android.support:design:23.0.1' compile 'com.jakewharton:butterknife:7.0.1'
#XML file
###activity_main
<android.support.design.widget.FloatingActionButton android:id="@+id/floating_action_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="16dp" android:clickable="true" android:src="@drawable/add" app:layout_anchor="@id/container" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" app:layout_anchorGravity="bottom|right|end"/>

  </RelativeLayout>