Extend from FloatingActionButton for Android
Extend from FloatingActionButton ##usage add this in your build.gradle(app module):
dependencies {
compile 'com.tellh:library:1.0'
}
And add this to your build.gradle(application root dir):
allprojects {
repositories {
jcenter()
maven {
url 'https://dl.bintray.com/tellh/maven/'
}
}
}
##Features:
xml:
<com.tellh.library.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_24dp"
fab:fab_animation="scale"
fab:fab_colorNormal="@color/accent"
fab:fab_colorPressed="@color/accent_pressed"
fab:fab_colorRipple="@color/ripple"/>
xml is the same above. But some difference in java code.
fab.attachToRecyclerView(recyclerView,null,null,true);//pass the ture flag if you need this effect.
xml:
<com.tellh.library.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_24dp"
fab:fab_animation="translate"
fab:fab_colorNormal="@color/accent"
fab:fab_colorPressed="@color/accent_pressed"
fab:fab_colorRipple="@color/ripple"/>
java code:
fab.attachToRecyclerView(recyclerView,null,null,true);//pass the ture flag if you need this effect.