Last active
September 15, 2016 08:44
-
-
Save nosix/6dbd4edc9554eaac7c9627b07f12937a to your computer and use it in GitHub Desktop.
FloatingActionButton for Android (SDK 24)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="org.anyspirit.nsetting.MainActivity"> | |
<android.support.design.widget.FloatingActionButton | |
android:id="@+id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="@dimen/base_margin" | |
android:layout_marginEnd="@dimen/base_margin" | |
android:layout_alignParentEnd="true" | |
android:layout_alignParentBottom="true" | |
android:src="@android:drawable/fab" | |
app:fabSize="normal" | |
app:elevation="4dp" | |
app:backgroundTint="@color/fab" /> | |
<!-- app:elevation : for shadow --> | |
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
... | |
compile 'com.android.support:design:24.2.0' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment