]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/template_details_header.xml
add fallback flag to templates
[mobile-ledger.git] / app / src / main / res / layout / template_details_header.xml
index 44b80ecb46b9c32ebd491c0d363102b972d51b7f..43514d04f812c2a6f7da86eb05685dc886927d19 100644 (file)
@@ -20,6 +20,7 @@
     android:id="@+id/pattern_details_item_head"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:animateLayoutChanges="true"
     android:padding="@dimen/text_margin"
     >
     <com.google.android.material.textfield.TextInputLayout
         android:id="@+id/transaction_comment_layout"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginBottom="@dimen/text_margin"
         app:endIconMode="clear_text"
-        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintBottom_toTopOf="@id/template_is_fallback_label"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@id/template_transaction_comment_source"
             android:hint="@string/template_transaction_comment_hint"
             />
     </com.google.android.material.textfield.TextInputLayout>
+    <TextView
+        android:id="@+id/template_is_fallback_label"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:text="@string/template_is_fallback_label"
+        android:textAppearance="?attr/textAppearanceListItem"
+        app:layout_constraintBottom_toTopOf="@+id/template_is_fallback_text"
+        app:layout_constraintEnd_toStartOf="@id/template_is_fallback_switch"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/transaction_comment_layout"
+        />
+    <TextView
+        android:id="@+id/template_is_fallback_text"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:textAppearance="?attr/textAppearanceListItemSecondary"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/template_is_fallback_switch"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/template_is_fallback_label"
+        />
+    <com.google.android.material.switchmaterial.SwitchMaterial
+        android:id="@+id/template_is_fallback_switch"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintBottom_toBottomOf="@id/template_is_fallback_text"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@id/template_is_fallback_label"
+        />
+
 
 </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file