trkpt/app/src/main/res/layout/activity_main.xml

174 lines
7.7 KiB
XML
Raw Normal View History

2016-08-29 12:50:41 +00:00
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
2016-08-29 12:50:41 +00:00
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">
2017-11-28 21:02:45 +00:00
<android.support.constraint.ConstraintLayout
android:id="@+id/container"
2016-08-29 12:50:41 +00:00
android:layout_width="match_parent"
2017-11-28 21:02:45 +00:00
android:layout_height="match_parent">
<!-- BUTTON MY LOCATION -->
<android.support.design.widget.FloatingActionButton
2018-01-16 13:27:50 +00:00
android:id="@+id/fabLocationButton"
2017-11-28 21:02:45 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2017-11-28 21:02:45 +00:00
android:layout_marginStart="16dp"
android:clickable="true"
2018-01-16 13:27:50 +00:00
android:focusable="true"
android:contentDescription="@string/descr_fab_my_location"
2017-11-28 21:02:45 +00:00
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" />
2016-08-29 12:50:41 +00:00
2017-11-28 21:02:45 +00:00
<!-- 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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2017-11-28 21:02:45 +00:00
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" />
2017-11-28 21:02:45 +00:00
<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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2018-02-07 14:00:34 +00:00
android:contentDescription="@string/descr_fab_sub_menu_label_1"
2017-11-28 21:02:45 +00:00
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>
2017-11-28 21:02:45 +00:00
<!-- 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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2017-11-28 21:02:45 +00:00
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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2017-11-28 21:02:45 +00:00
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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2017-11-28 21:02:45 +00:00
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"
2018-01-16 13:27:50 +00:00
android:clickable="true"
android:focusable="true"
2017-11-28 21:02:45 +00:00
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
2018-01-16 13:27:50 +00:00
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" />
2017-11-28 21:02:45 +00:00
</android.support.constraint.ConstraintLayout>
</android.support.design.widget.CoordinatorLayout>
2016-08-29 12:50:41 +00:00