fragment_process_payment.xml (7249B)
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=".payment.ProcessPaymentFragment"> 23 24 <androidx.constraintlayout.widget.ConstraintLayout 25 android:id="@+id/qrcodeLayout" 26 android:layout_width="0dp" 27 android:layout_height="0dp" 28 android:layout_margin="12dp" 29 app:layout_constraintBottom_toBottomOf="parent" 30 app:layout_constraintEnd_toStartOf="@+id/guideline" 31 app:layout_constraintStart_toStartOf="parent" 32 app:layout_constraintTop_toTopOf="parent" 33 android:visibility="invisible" 34 tools:visibility="visible"> 35 36 <FrameLayout 37 android:id="@+id/qrcodeContainer" 38 android:layout_width="0dp" 39 android:layout_height="0dp" 40 android:layout_margin="12dp" 41 app:layout_constraintDimensionRatio="1:1" 42 app:layout_constraintStart_toStartOf="parent" 43 app:layout_constraintEnd_toEndOf="parent" 44 app:layout_constraintTop_toTopOf="parent" 45 app:layout_constraintBottom_toTopOf="@id/shareButton"> 46 47 <androidx.compose.ui.platform.ComposeView 48 android:id="@+id/qrcodeView" 49 android:layout_width="match_parent" 50 android:layout_height="match_parent" 51 android:layout_margin="6dp" 52 tools:ignore="ContentDescription" /> 53 54 </FrameLayout> 55 56 <Button 57 android:id="@+id/shareButton" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 app:layout_constraintBottom_toBottomOf="parent" 61 app:layout_constraintStart_toStartOf="parent" 62 app:layout_constraintEnd_toStartOf="@id/copyButton" 63 android:text="@string/share"/> 64 65 <Button 66 android:id="@+id/copyButton" 67 android:layout_width="wrap_content" 68 android:layout_height="wrap_content" 69 app:layout_constraintBottom_toBottomOf="parent" 70 app:layout_constraintEnd_toEndOf="parent" 71 app:layout_constraintStart_toEndOf="@id/shareButton" 72 android:text="@string/copy"/> 73 74 </androidx.constraintlayout.widget.ConstraintLayout> 75 76 <ProgressBar 77 android:id="@+id/progressBar" 78 style="?android:attr/progressBarStyleLarge" 79 android:layout_width="wrap_content" 80 android:layout_height="wrap_content" 81 android:indeterminateTint="@color/colorPrimary" 82 app:layout_constraintBottom_toBottomOf="@+id/qrcodeLayout" 83 app:layout_constraintEnd_toEndOf="@+id/qrcodeLayout" 84 app:layout_constraintStart_toStartOf="@+id/qrcodeLayout" 85 app:layout_constraintTop_toTopOf="@+id/qrcodeLayout" /> 86 87 <androidx.constraintlayout.widget.Guideline 88 android:id="@+id/guideline" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:orientation="vertical" 92 app:layout_constraintGuide_percent="0.54" /> 93 94 <TextView 95 android:id="@+id/payIntroView" 96 android:layout_width="0dp" 97 android:layout_height="wrap_content" 98 android:layout_margin="16dp" 99 android:text="@string/payment_intro_nfc" 100 android:textAlignment="center" 101 android:textSize="22sp" 102 android:visibility="invisible" 103 app:layout_constraintBottom_toTopOf="@+id/amountView" 104 app:layout_constraintEnd_toEndOf="parent" 105 app:layout_constraintStart_toStartOf="@+id/guideline" 106 app:layout_constraintTop_toTopOf="parent" 107 app:layout_constraintVertical_chainStyle="spread" 108 tools:visibility="visible" /> 109 110 <TextView 111 android:id="@+id/amountView" 112 android:layout_width="wrap_content" 113 android:layout_height="wrap_content" 114 android:layout_margin="16dp" 115 android:textAppearance="@style/TextAppearance.AppCompat.Headline" 116 app:layout_constraintBottom_toTopOf="@+id/orderRefView" 117 app:layout_constraintEnd_toEndOf="parent" 118 app:layout_constraintStart_toStartOf="@+id/guideline" 119 app:layout_constraintTop_toBottomOf="@+id/payIntroView" 120 tools:text="10.49 TESTKUDOS" /> 121 122 <TextView 123 android:id="@+id/orderRefView" 124 android:layout_width="0dp" 125 android:layout_height="wrap_content" 126 android:layout_margin="16dp" 127 android:textAlignment="center" 128 android:visibility="invisible" 129 app:layout_constraintBottom_toTopOf="@id/cancelPaymentButton" 130 app:layout_constraintEnd_toEndOf="parent" 131 app:layout_constraintStart_toStartOf="@+id/guideline" 132 app:layout_constraintTop_toBottomOf="@+id/amountView" 133 tools:text="@string/payment_order_id" 134 tools:visibility="visible" /> 135 136 <Button 137 android:id="@+id/cancelPaymentButton" 138 android:layout_width="wrap_content" 139 android:layout_height="wrap_content" 140 android:layout_margin="16dp" 141 android:backgroundTint="@color/red" 142 android:textColor="?attr/colorOnError" 143 android:text="@string/payment_cancel" 144 app:layout_constraintBottom_toBottomOf="parent" 145 app:layout_constraintEnd_toEndOf="parent" 146 app:layout_constraintHorizontal_bias="0.0" 147 app:layout_constraintStart_toStartOf="@+id/guideline" /> 148 149 <FrameLayout 150 android:id="@+id/qrPreviewOverlay" 151 android:layout_width="0dp" 152 android:layout_height="0dp" 153 android:background="#CC000000" 154 android:clickable="true" 155 android:focusable="true" 156 android:visibility="gone" 157 app:layout_constraintBottom_toBottomOf="parent" 158 app:layout_constraintEnd_toEndOf="parent" 159 app:layout_constraintStart_toStartOf="parent" 160 app:layout_constraintTop_toTopOf="parent"> 161 162 <ImageView 163 android:id="@+id/qrPreviewImage" 164 android:layout_width="match_parent" 165 android:layout_height="match_parent" 166 android:layout_gravity="center" 167 android:layout_margin="24dp" 168 android:adjustViewBounds="true" 169 android:scaleType="fitCenter" 170 tools:src="@tools:sample/avatars" /> 171 </FrameLayout> 172 173 </androidx.constraintlayout.widget.ConstraintLayout>