Improved fab speed dial

This commit is contained in:
2017-07-26 21:01:07 +02:00
parent faa6752b10
commit e064012551
15 changed files with 187 additions and 212 deletions

View File

@ -0,0 +1,35 @@
<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"
android:gravity="center">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/item_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
tools:context=".MessageListActivity"
tools:layout="@android:layout/list_content" />
<io.github.kobakei.materialfabspeeddial.FabSpeedDial
android:id="@+id/fab"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:fab_useTouchGuard="true"
app:fab_miniFabTextBackground="@color/colorAccent"
app:fab_miniFabTextColor="@color/colorPrimaryDarkText" />
</RelativeLayout>

View File

@ -1,26 +0,0 @@
<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:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:elevation="4dp"
tools:ignore="UnusedAttribute"/>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_below="@id/toolbar"
android:id="@+id/item_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MessageListActivity"
tools:layout="@android:layout/list_content"/>
</RelativeLayout>

View File

@ -1,6 +1,5 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -17,17 +16,4 @@
android:paddingBottom="88dp"
android:scrollbarStyle="outsideOverlay" />
<io.github.kobakei.materialfabspeeddial.FabSpeedDial
android:id="@+id/fab_add_contact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:elevation="8dp"
app:fab_useTouchGuard="true"
app:fab_miniFabTextBackground="@color/colorPrimaryLight"
app:fab_fabDrawable="@drawable/ic_action_add_contact"
app:fab_menu="@menu/fab_address" />
</RelativeLayout>

View File

@ -1,6 +1,5 @@
<?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">
@ -19,17 +18,4 @@
android:scrollbars="vertical"
tools:listitem="@layout/message_row"/>
<io.github.kobakei.materialfabspeeddial.FabSpeedDial
android:id="@+id/fab_compose_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:elevation="8dp"
app:fab_useTouchGuard="true"
app:fab_miniFabTextBackground="@color/colorPrimaryLight"
app:fab_fabDrawable="@drawable/ic_action_compose_message"
app:fab_menu="@menu/fab_message"/>
</RelativeLayout>