Floating Action Button With SnackBar
Material Design
Note: In this Category  Android studio make default view with Floating Action Button and Snack bar, If you create a new Project click any activity with including FAB.
"Create a new Project and next blank activity
you will see the FAB with snackbar"
1.Add your support  file on "build.gradle" inside your app folder
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
Add inside into dependencies {  .........   }
if your gradle version is 23.2.0.. may be its changed by your project.. replace version number to <your version number>
2. This is a xml file to placing your layout file
<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
android:layout_width="wrap_content"android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:src="@drawable/ic_launcher"
    android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />


 
No comments:
Post a Comment