taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

fragment_refund.xml (5450B)


      1 <?xml version="1.0" encoding="utf-8"?><!--
      2   ~ This file is part of GNU Taler
      3   ~ (C) 2020 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     tools:context=".refund.RefundFragment">
     23 
     24     <com.google.android.material.textfield.TextInputLayout
     25         android:id="@+id/amountView"
     26         style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
     27         android:layout_width="wrap_content"
     28         android:layout_height="wrap_content"
     29         android:layout_margin="16dp"
     30         android:hint="@string/refund_amount"
     31         app:boxBackgroundMode="outline"
     32         app:endIconMode="clear_text"
     33         app:endIconTint="?attr/colorControlNormal"
     34         app:layout_constraintBottom_toTopOf="@+id/reasonView"
     35         app:layout_constraintEnd_toStartOf="@+id/currencyView"
     36         app:layout_constraintHorizontal_chainStyle="packed"
     37         app:layout_constraintStart_toStartOf="parent"
     38         app:layout_constraintTop_toTopOf="parent"
     39         app:layout_constraintVertical_chainStyle="spread">
     40 
     41         <com.google.android.material.textfield.TextInputEditText
     42             android:id="@+id/amountInputView"
     43             android:layout_width="match_parent"
     44             android:layout_height="wrap_content"
     45             android:ems="6"
     46             android:inputType="numberDecimal"
     47             tools:text="23.42" />
     48 
     49     </com.google.android.material.textfield.TextInputLayout>
     50 
     51     <TextView
     52         android:id="@+id/currencyView"
     53         android:layout_width="wrap_content"
     54         android:layout_height="0dp"
     55         android:layout_marginStart="8dp"
     56         android:gravity="start|center_vertical"
     57         app:layout_constraintBottom_toBottomOf="@+id/amountView"
     58         app:layout_constraintEnd_toEndOf="parent"
     59         app:layout_constraintStart_toEndOf="@+id/amountView"
     60         app:layout_constraintTop_toTopOf="@+id/amountView"
     61         tools:text="TESTKUDOS" />
     62 
     63     <com.google.android.material.textfield.TextInputLayout
     64         android:id="@+id/reasonView"
     65         style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
     66         android:layout_width="0dp"
     67         android:layout_height="wrap_content"
     68         android:layout_margin="16dp"
     69         android:hint="@string/refund_reason"
     70         app:endIconMode="clear_text"
     71         app:layout_constraintBottom_toTopOf="@+id/abortButton"
     72         app:layout_constraintEnd_toEndOf="parent"
     73         app:layout_constraintHorizontal_bias="0.5"
     74         app:layout_constraintStart_toStartOf="parent"
     75         app:layout_constraintTop_toBottomOf="@+id/amountView">
     76 
     77         <com.google.android.material.textfield.TextInputEditText
     78             android:id="@+id/reasonInputView"
     79             android:layout_width="match_parent"
     80             android:layout_height="wrap_content"
     81             android:inputType="textAutoComplete|textAutoCorrect|textMultiLine" />
     82 
     83     </com.google.android.material.textfield.TextInputLayout>
     84 
     85     <Button
     86         android:id="@+id/abortButton"
     87         android:layout_width="wrap_content"
     88         android:layout_height="wrap_content"
     89         android:layout_margin="16dp"
     90         android:backgroundTint="@color/red"
     91         android:text="@string/refund_abort"
     92         app:layout_constraintBottom_toBottomOf="parent"
     93         app:layout_constraintEnd_toStartOf="@+id/refundButton"
     94         app:layout_constraintHorizontal_bias="0.76"
     95         app:layout_constraintHorizontal_chainStyle="spread_inside"
     96         app:layout_constraintStart_toStartOf="parent" />
     97 
     98     <Button
     99         android:id="@+id/refundButton"
    100         android:layout_width="wrap_content"
    101         android:layout_height="wrap_content"
    102         android:layout_margin="16dp"
    103         android:backgroundTint="@color/green"
    104         android:text="@string/refund_confirm"
    105         app:layout_constraintBottom_toBottomOf="parent"
    106         app:layout_constraintEnd_toEndOf="parent"
    107         app:layout_constraintHorizontal_bias="0.5"
    108         app:layout_constraintStart_toEndOf="@+id/abortButton" />
    109 
    110     <ProgressBar
    111         android:id="@+id/progressBar"
    112         style="?android:attr/progressBarStyle"
    113         android:layout_width="wrap_content"
    114         android:layout_height="wrap_content"
    115         android:visibility="invisible"
    116         app:layout_constraintBottom_toBottomOf="@+id/refundButton"
    117         app:layout_constraintEnd_toEndOf="@+id/refundButton"
    118         app:layout_constraintStart_toStartOf="@+id/refundButton"
    119         app:layout_constraintTop_toTopOf="@+id/refundButton"
    120         tools:visibility="visible" />
    121 
    122 </androidx.constraintlayout.widget.ConstraintLayout>