Skip to content

Instantly share code, notes, and snippets.

@echirchir
Created September 25, 2015 18:04
Show Gist options
  • Save echirchir/fc932ec3c522c18b5404 to your computer and use it in GitHub Desktop.
Save echirchir/fc932ec3c522c18b5404 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/coordinator"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_collapseMode="pin" />
<LinearLayout
android:id="@+id/upper"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:gravity="center_vertical"
android:background="@color/colorPrimary"
android:layout_weight=".3">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_gravity="start|center_vertical"
android:gravity="start"
android:textColor="@color/textColor"
android:text="@string/think"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_gravity="start|center_vertical"
android:gravity="start"
android:textColor="@color/textColor"
android:textStyle="italic"
android:text="@string/think_subtitle"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight=".8">
<TextView
android:id="@+id/quote"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".7"
android:gravity="center_vertical"
android:layout_marginStart="16dp"
android:padding="8dp"
android:layout_gravity="center"
android:textColor="@color/colorSecondaryText"
android:textSize="25sp"
android:text="@string/quote"
android:layout_marginEnd="16dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:background="@color/divider"/>
<TextView
android:id="@+id/author"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".3"
android:layout_marginStart="16dp"
android:layout_gravity="end"
android:padding="8dp"
android:textStyle="italic"
android:textSize="18sp"
android:gravity="end|top"
android:text="@string/author"
android:layout_marginEnd="16dp"/>
</LinearLayout>
</LinearLayout>
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_addButtonColorNormal="@color/accent"
fab:fab_addButtonColorPressed="@color/white_pressed"
fab:fab_addButtonSize="normal"
android:src="@drawable/add"
app:layout_anchor="@+id/upper"
app:layout_anchorGravity="bottom|end"
fab:fab_expandDirection="down"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/edit"
fab:layout_anchor="@+id/upper"
fab:fab_colorNormal="@color/accent"
fab:fab_size="mini"
fab:fab_colorPressed="@color/white_pressed"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/mic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/accent"
android:src="@drawable/mic"
fab:layout_anchor="@+id/upper"
fab:fab_colorPressed="@color/white_pressed"
fab:fab_size="mini"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
<!--<android.support.design.widget.FloatingActionButton-->
<!--android:id="@+id/fab"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginLeft="16dp"-->
<!--android:layout_marginRight="16dp"-->
<!--android:src="@drawable/mic"-->
<!--app:layout_anchor="@+id/upper"-->
<!--app:layout_anchorGravity="bottom|end"/>-->
</android.support.design.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment