trkpt/app/src/main/res/layout/activity_main.xml
2018-01-16 14:27:50 +01:00

173 lines
7.7 KiB
XML

<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.y20k.trackbook.MainActivity">
<android.support.constraint.ConstraintLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- BUTTON MY LOCATION -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabLocationButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_my_location"
app:backgroundTint="@color/trackbook_white"
app:fabSize="mini"
app:layout_constraintBottom_toBottomOf="@+id/fabMainButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/fabMainButton"
app:srcCompat="@drawable/ic_my_location_grey_24dp" />
<!-- BUTTON SAVE AND CLEAR -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabSubMenuButtonSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_sub_menu_button_1"
app:backgroundTint="@color/trackbook_green"
app:fabSize="mini"
app:layout_constraintBottom_toTopOf="@+id/fabSubMenuButtonClear"
app:layout_constraintEnd_toEndOf="@+id/fabSubMenuButtonClear"
app:layout_constraintStart_toStartOf="@+id/fabSubMenuButtonClear"
app:srcCompat="@drawable/ic_save_white_24dp" />
<android.support.v7.widget.CardView
android:id="@+id/fabSubMenuLabelSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_sub_menu_button_1"
app:cardBackgroundColor="@color/trackbook_white"
app:cardCornerRadius="4dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="@+id/fabSubMenuButtonSave"
app:layout_constraintEnd_toStartOf="@+id/fabSubMenuButtonSave"
app:layout_constraintTop_toTopOf="@+id/fabSubMenuButtonSave">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="2dp"
android:text="@string/fab_sub_menu_save_and_clear"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"
tools:layout_editor_absoluteX="110dp"
tools:layout_editor_absoluteY="239dp" />
</android.support.v7.widget.CardView>
<!-- BUTTON CLEAR -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabSubMenuButtonClear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_sub_menu_button_2"
app:backgroundTint="@color/trackbook_blue"
app:fabSize="mini"
app:layout_constraintBottom_toTopOf="@+id/fabMainButton"
app:layout_constraintEnd_toEndOf="@+id/fabMainButton"
app:layout_constraintStart_toStartOf="@+id/fabMainButton"
app:srcCompat="@drawable/ic_clear_white_24dp" />
<android.support.v7.widget.CardView
android:id="@+id/fabSubMenuLabelClear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_sub_menu_label_2"
app:cardBackgroundColor="@color/trackbook_white"
app:cardCornerRadius="4dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="@+id/fabSubMenuButtonClear"
app:layout_constraintEnd_toStartOf="@+id/fabSubMenuButtonClear"
app:layout_constraintTop_toTopOf="@+id/fabSubMenuButtonClear">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="2dp"
android:text="@string/fab_sub_menu_clear"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"
tools:layout_editor_absoluteX="124dp"
tools:layout_editor_absoluteY="447dp" />
</android.support.v7.widget.CardView>
<!-- MAIN BUTTON -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabMainButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/descr_fab_main"
app:backgroundTint="@color/trackbook_blue"
app:fabSize="normal"
app:layout_constraintBottom_toTopOf="@+id/navigation"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_fiber_manual_record_white_24dp" />
<!-- BOTTOM NAVIGATION -->
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/trackbook_red"
android:clickable="true"
android:focusable="true"
app:itemIconTint="@drawable/selector_bottom_navigation"
app:itemTextColor="@drawable/selector_bottom_navigation"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/menu_main" />
<org.y20k.trackbook.layout.NonSwipeableViewPager
android:id="@+id/fragmentContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/navigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.design.widget.CoordinatorLayout>