diff options
author | Torsten Grote <t@grobox.de> | 2023-03-08 15:55:07 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2023-03-08 15:55:07 -0300 |
commit | e690df6d0eaacb60ca9edf1d4caf382711278b8b (patch) | |
tree | 2b07e0856413f482fe588d7956e6559a2f77dd3f /merchant-terminal/src/main/res/layout | |
parent | 34954e4c0c730910ee45dec85a64117aa57023c2 (diff) | |
download | taler-android-e690df6d0eaacb60ca9edf1d4caf382711278b8b.tar.gz taler-android-e690df6d0eaacb60ca9edf1d4caf382711278b8b.tar.bz2 taler-android-e690df6d0eaacb60ca9edf1d4caf382711278b8b.zip |
[pos] add button for adding custom products
Diffstat (limited to 'merchant-terminal/src/main/res/layout')
-rw-r--r-- | merchant-terminal/src/main/res/layout/fragment_custom_dialog.xml | 117 | ||||
-rw-r--r-- | merchant-terminal/src/main/res/layout/fragment_order.xml | 13 |
2 files changed, 129 insertions, 1 deletions
diff --git a/merchant-terminal/src/main/res/layout/fragment_custom_dialog.xml b/merchant-terminal/src/main/res/layout/fragment_custom_dialog.xml new file mode 100644 index 0000000..8da50ad --- /dev/null +++ b/merchant-terminal/src/main/res/layout/fragment_custom_dialog.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ This file is part of GNU Taler + ~ (C) 2023 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + 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"> + + <TextView + android:id="@+id/titleView" + style="@style/TextAppearance.Material3.TitleMedium" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:text="@string/order_custom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/productNameLayout" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/titleView"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/order_custom_product" + android:inputType="textShortMessage" + android:singleLine="true" + android:text="@string/order_custom_product_default" /> + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/amountLayout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="8dp" + android:minEms="5" + app:layout_constraintEnd_toStartOf="@+id/currencyView" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintHorizontal_chainStyle="packed" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/productNameLayout"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/refund_amount" + android:inputType="numberDecimal"> + + <requestFocus /> + </com.google.android.material.textfield.TextInputEditText> + </com.google.android.material.textfield.TextInputLayout> + + <TextView + android:id="@+id/currencyView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + app:layout_constraintBottom_toBottomOf="@+id/amountLayout" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/amountLayout" + app:layout_constraintTop_toTopOf="@+id/amountLayout" + tools:text="TESTKUDOS" /> + + <Button + android:id="@+id/addButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="16dp" + android:text="@string/order_custom_add_button" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/amountLayout" + app:layout_constraintVertical_bias="0.0" /> + + <Button + android:id="@+id/cancelButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:text="@android:string/cancel" + app:layout_constraintEnd_toStartOf="@+id/addButton" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/amountLayout" /> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/merchant-terminal/src/main/res/layout/fragment_order.xml b/merchant-terminal/src/main/res/layout/fragment_order.xml index dc49db1..45f1aee 100644 --- a/merchant-terminal/src/main/res/layout/fragment_order.xml +++ b/merchant-terminal/src/main/res/layout/fragment_order.xml @@ -121,6 +121,17 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@+id/prevButton" /> + <ImageButton + android:id="@+id/customButton" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_marginStart="16dp" + android:backgroundTint="?colorPrimary" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/nextButton" + app:srcCompat="@drawable/ic_dialpad" + android:contentDescription="@string/order_custom" /> + <Button android:id="@+id/completeButton" android:layout_width="wrap_content" @@ -132,6 +143,6 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" - app:layout_constraintStart_toEndOf="@+id/nextButton" /> + app:layout_constraintStart_toEndOf="@+id/customButton" /> </androidx.constraintlayout.widget.ConstraintLayout> |