]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/activity_new_transaction.xml
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / res / layout / activity_new_transaction.xml
index 3ff1415afdac1e9e682c0154017568815bcd2c71..55273c7414e947136fe40be282f45fe0444a045c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?><!--
-  ~ Copyright © 2019 Damyan Ivanov.
+  ~ Copyright © 2021 Damyan Ivanov.
   ~ This file is part of MoLe.
   ~ MoLe is free software: you can distribute it and/or modify it
   ~ under the term of the GNU General Public License as published by
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context=".ui.activity.NewTransactionActivity">
+    tools:context=".ui.new_transaction.NewTransactionActivity"
+    android:fitsSystemWindows="false"
+    >
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:animateLayoutChanges="true">
+        android:animateLayoutChanges="true"
+        >
 
         <TextView
             android:id="@+id/simulationLabel"
-            style="@style/StretchedTextView"
             android:layout_width="0dp"
             android:layout_height="0dp"
             android:layout_margin="@dimen/activity_horizontal_margin"
             android:rotation="-45"
             android:text="@string/simulation_label"
             android:textAlignment="center"
-            android:textColor="@color/table_row_dark_bg"
+            android:textColor="?attr/table_row_dark_bg"
             android:textIsSelectable="false"
             android:textSize="36sp"
             android:textStyle="bold"
+            android:visibility="gone"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/toolbar_layout" />
+            app:layout_constraintTop_toBottomOf="@+id/toolbar_layout"
+            />
 
         <com.google.android.material.appbar.AppBarLayout
             android:id="@+id/toolbar_layout"
             android:theme="@style/AppTheme.AppBarOverlay"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent">
+            app:layout_constraintTop_toTopOf="parent"
+            >
 
             <androidx.appcompat.widget.Toolbar
                 android:id="@+id/toolbar"
                 android:layout_width="match_parent"
-                android:layout_height="?attr/actionBarSize"
+                android:layout_height="wrap_content"
+                android:minHeight="?attr/actionBarSize"
                 android:background="?attr/colorPrimary"
-                app:popupTheme="@style/AppTheme.PopupOverlay" />
+                app:popupTheme="@style/AppTheme.PopupOverlay"
+                app:subtitleTextAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle"
+                app:titleTextAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
+                />
 
         </com.google.android.material.appbar.AppBarLayout>
 
-        <fragment
+        <androidx.fragment.app.FragmentContainerView
             android:id="@+id/new_transaction_nav"
             android:name="androidx.navigation.fragment.NavHostFragment"
             android:layout_width="0dp"
             android:layout_height="0dp"
+            app:defaultNavHost="true"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@id/toolbar_layout"
-            app:navGraph="@navigation/new_transaction_navigation" />
+            app:navGraph="@navigation/new_transaction_navigation"
+            />
 
     </androidx.constraintlayout.widget.ConstraintLayout>
-
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/fabAdd"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="@dimen/fab_margin"
+        android:layout_marginBottom="@dimen/fab_margin"
+        android:contentDescription="@string/add_button_description"
+        android:padding="@dimen/fab_margin"
+        android:tint="?android:attr/colorBackground"
+        android:visibility="visible"
+        app:backgroundTint="?colorSecondary"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:srcCompat="@drawable/ic_save_white_24dp"
+        />
 </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file