android:layout_height="match_parent"
tools:context=".ui.activity.NewTransactionActivity">
- <com.google.android.material.appbar.AppBarLayout
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:theme="@style/AppTheme.AppBarOverlay">
+ android:layout_height="match_parent"
+ 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:clickable="false"
+ android:gravity="center"
+ android:maxLines="1"
+ android:rotation="-45"
+ android:text="@string/simulation_label"
+ android:textAlignment="center"
+ android:textColor="@color/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" />
- <androidx.appcompat.widget.Toolbar
- android:id="@+id/toolbar"
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="?attr/colorPrimary"
- app:popupTheme="@style/AppTheme.PopupOverlay" />
+ android:layout_height="wrap_content"
+ android:theme="@style/AppTheme.AppBarOverlay"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
- </com.google.android.material.appbar.AppBarLayout>
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ android:background="?attr/colorPrimary"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />
- <include layout="@layout/content_new_transaction" />
+ </com.google.android.material.appbar.AppBarLayout>
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ProgressBar
- android:id="@+id/save_transaction_progress"
- android:layout_width="80dp"
- android:layout_height="80dp"
- android:layout_margin="4dp"
- android:indeterminate="true"
- android:visibility="invisible"
+ <fragment
+ android:id="@+id/new_transaction_nav"
+ android:name="androidx.navigation.fragment.NavHostFragment"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent" />
-
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/fab"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:padding="@dimen/fab_margin"
- android:tint="@android:color/white"
- android:visibility="gone"
- app:backgroundTint="?colorPrimary"
- app:layout_constraintBottom_toBottomOf="@id/save_transaction_progress"
- app:layout_constraintEnd_toEndOf="@id/save_transaction_progress"
- app:layout_constraintStart_toStartOf="@id/save_transaction_progress"
- app:layout_constraintTop_toTopOf="@id/save_transaction_progress"
- app:srcCompat="@drawable/ic_save_white_24dp" />
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/toolbar_layout"
+ app:navGraph="@navigation/new_transaction_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>