fragment_custom_dialog.xml (5179B)
1 <?xml version="1.0" encoding="utf-8"?><!-- 2 ~ This file is part of GNU Taler 3 ~ (C) 2023 Taler Systems S.A. 4 ~ 5 ~ GNU Taler is free software; you can redistribute it and/or modify it under the 6 ~ terms of the GNU General Public License as published by the Free Software 7 ~ Foundation; either version 3, or (at your option) any later version. 8 ~ 9 ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY 10 ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 ~ 13 ~ You should have received a copy of the GNU General Public License along with 14 ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 --> 16 17 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 xmlns:tools="http://schemas.android.com/tools" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 23 <TextView 24 android:id="@+id/titleView" 25 style="@style/TextAppearance.Material3.TitleMedium" 26 android:layout_width="0dp" 27 android:layout_height="wrap_content" 28 android:layout_marginStart="16dp" 29 android:layout_marginTop="16dp" 30 android:layout_marginEnd="16dp" 31 android:text="@string/order_custom" 32 app:layout_constraintEnd_toEndOf="parent" 33 app:layout_constraintStart_toStartOf="parent" 34 app:layout_constraintTop_toTopOf="parent" /> 35 36 <com.google.android.material.textfield.TextInputLayout 37 android:id="@+id/productNameLayout" 38 android:layout_width="0dp" 39 android:layout_height="wrap_content" 40 android:layout_marginStart="16dp" 41 android:layout_marginTop="16dp" 42 android:layout_marginEnd="16dp" 43 app:layout_constraintEnd_toEndOf="parent" 44 app:layout_constraintStart_toStartOf="parent" 45 app:layout_constraintTop_toBottomOf="@+id/titleView"> 46 47 <com.google.android.material.textfield.TextInputEditText 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:hint="@string/order_custom_product" 51 android:inputType="textShortMessage" 52 android:singleLine="true" 53 android:text="@string/order_custom_product_default" /> 54 </com.google.android.material.textfield.TextInputLayout> 55 56 <com.google.android.material.textfield.TextInputLayout 57 android:id="@+id/amountLayout" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 android:layout_marginStart="16dp" 61 android:layout_marginTop="16dp" 62 android:layout_marginEnd="8dp" 63 android:minEms="5" 64 app:layout_constraintEnd_toStartOf="@+id/currencyView" 65 app:layout_constraintHorizontal_bias="1.0" 66 app:layout_constraintHorizontal_chainStyle="packed" 67 app:layout_constraintStart_toStartOf="parent" 68 app:layout_constraintTop_toBottomOf="@+id/productNameLayout"> 69 70 <com.google.android.material.textfield.TextInputEditText 71 android:layout_width="match_parent" 72 android:layout_height="wrap_content" 73 android:hint="@string/refund_amount" 74 android:inputType="numberDecimal"> 75 76 <requestFocus /> 77 </com.google.android.material.textfield.TextInputEditText> 78 </com.google.android.material.textfield.TextInputLayout> 79 80 <TextView 81 android:id="@+id/currencyView" 82 android:layout_width="wrap_content" 83 android:layout_height="wrap_content" 84 android:layout_marginEnd="16dp" 85 app:layout_constraintBottom_toBottomOf="@+id/amountLayout" 86 app:layout_constraintEnd_toEndOf="parent" 87 app:layout_constraintHorizontal_bias="0.5" 88 app:layout_constraintStart_toEndOf="@+id/amountLayout" 89 app:layout_constraintTop_toTopOf="@+id/amountLayout" 90 tools:text="TESTKUDOS" /> 91 92 <Button 93 android:id="@+id/addButton" 94 android:layout_width="wrap_content" 95 android:layout_height="wrap_content" 96 android:layout_marginTop="16dp" 97 android:layout_marginEnd="16dp" 98 android:layout_marginBottom="16dp" 99 android:text="@string/order_custom_add_button" 100 app:layout_constraintBottom_toBottomOf="parent" 101 app:layout_constraintEnd_toEndOf="parent" 102 app:layout_constraintTop_toBottomOf="@+id/amountLayout" 103 app:layout_constraintVertical_bias="0.0" /> 104 105 <Button 106 android:id="@+id/cancelButton" 107 android:layout_width="wrap_content" 108 android:layout_height="wrap_content" 109 android:layout_marginStart="16dp" 110 android:layout_marginTop="16dp" 111 android:layout_marginEnd="16dp" 112 android:text="@android:string/cancel" 113 app:layout_constraintEnd_toStartOf="@+id/addButton" 114 app:layout_constraintHorizontal_bias="1.0" 115 app:layout_constraintStart_toStartOf="parent" 116 app:layout_constraintTop_toBottomOf="@+id/amountLayout" /> 117 </androidx.constraintlayout.widget.ConstraintLayout>