diff options
Diffstat (limited to 'cashier/src/main/res/layout')
-rw-r--r-- | cashier/src/main/res/layout/activity_main.xml | 51 | ||||
-rw-r--r-- | cashier/src/main/res/layout/fragment_balance.xml | 225 | ||||
-rw-r--r-- | cashier/src/main/res/layout/fragment_config.xml | 112 | ||||
-rw-r--r-- | cashier/src/main/res/layout/fragment_error.xml | 65 | ||||
-rw-r--r-- | cashier/src/main/res/layout/fragment_transaction.xml | 100 |
5 files changed, 553 insertions, 0 deletions
diff --git a/cashier/src/main/res/layout/activity_main.xml b/cashier/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..e41b842 --- /dev/null +++ b/cashier/src/main/res/layout/activity_main.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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.coordinatorlayout.widget.CoordinatorLayout 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" + tools:context=".MainActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" + style="@style/AppTheme.Toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.fragment.app.FragmentContainerView + android:id="@+id/nav_host_fragment" + android:name="androidx.navigation.fragment.NavHostFragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:defaultNavHost="true" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:navGraph="@navigation/nav_graph" /> + +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/cashier/src/main/res/layout/fragment_balance.xml b/cashier/src/main/res/layout/fragment_balance.xml new file mode 100644 index 0000000..5dafc59 --- /dev/null +++ b/cashier/src/main/res/layout/fragment_balance.xml @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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" + tools:context=".BalanceFragment"> + + <TextView + android:id="@+id/lastTransactionView" + style="@style/Widget.MaterialComponents.Snackbar.FullWidth" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:background="?attr/colorPrimaryDark" + android:drawableStart="@drawable/ic_check_circle" + android:drawablePadding="8dp" + android:drawableTint="?attr/colorOnPrimarySurface" + android:gravity="center_vertical" + android:padding="8dp" + android:textColor="?attr/colorOnPrimarySurface" + android:visibility="gone" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="@string/transaction_last_success" + tools:visibility="visible" /> + + <View + android:id="@+id/balanceBackground" + android:layout_width="0dp" + android:layout_height="0dp" + android:background="@color/background" + app:layout_constraintBottom_toBottomOf="@+id/balanceView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/lastTransactionView" /> + + <TextView + android:id="@+id/balanceLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:text="@string/balance_current_label" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/lastTransactionView" /> + + <TextView + android:id="@+id/balanceView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:paddingStart="@dimen/default_margin" + android:paddingTop="8dp" + android:gravity="center" + android:paddingEnd="@dimen/default_margin" + android:paddingBottom="@dimen/default_margin" + android:textAppearance="@style/TextAppearance.AppCompat.Headline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/balanceLabel" + tools:text="100 KUDOS" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="@+id/balanceView" + app:layout_constraintEnd_toEndOf="@+id/balanceView" + app:layout_constraintStart_toStartOf="@+id/balanceView" + app:layout_constraintTop_toTopOf="@+id/balanceView" /> + + <TextView + android:id="@+id/introView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/default_margin" + android:layout_marginTop="32dp" + android:layout_marginEnd="@dimen/default_margin" + android:text="@string/withdraw_into" + android:textAlignment="center" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:visibility="invisible" + app:layout_constraintBottom_toTopOf="@+id/button5" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/balanceBackground" + app:layout_constraintVertical_bias="0.25" + app:layout_constraintVertical_chainStyle="packed" + tools:visibility="visible" /> + + <Button + android:id="@+id/button5" + style="@style/AmountButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="5" + android:visibility="invisible" + app:layout_constraintBottom_toTopOf="@+id/amountView" + app:layout_constraintEnd_toStartOf="@+id/button10" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintHorizontal_chainStyle="packed" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/introView" + tools:ignore="HardcodedText" + tools:visibility="visible" /> + + <Button + android:id="@+id/button10" + style="@style/AmountButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="10" + android:visibility="invisible" + app:layout_constraintEnd_toStartOf="@+id/button20" + app:layout_constraintStart_toEndOf="@+id/button5" + app:layout_constraintTop_toBottomOf="@+id/introView" + tools:ignore="HardcodedText" + tools:visibility="visible" /> + + <Button + android:id="@+id/button20" + style="@style/AmountButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="20" + android:visibility="invisible" + app:layout_constraintEnd_toStartOf="@+id/button50" + app:layout_constraintStart_toEndOf="@+id/button10" + app:layout_constraintTop_toBottomOf="@+id/introView" + tools:ignore="HardcodedText" + tools:visibility="visible" /> + + <Button + android:id="@+id/button50" + style="@style/AmountButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="50" + android:visibility="invisible" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/button20" + app:layout_constraintTop_toBottomOf="@+id/introView" + tools:ignore="HardcodedText" + tools:visibility="visible" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/amountView" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/default_margin" + android:layout_marginTop="@dimen/default_margin" + android:hint="@string/withdraw_input_amount" + android:visibility="invisible" + app:endIconDrawable="@drawable/ic_clear" + app:endIconMode="clear_text" + app:endIconTint="?attr/colorControlNormal" + app:layout_constraintBottom_toTopOf="@+id/confirmWithdrawalButton" + app:layout_constraintEnd_toStartOf="@+id/currencyView" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintHorizontal_chainStyle="packed" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/button5" + tools:visibility="visible"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ems="6" + android:imeOptions="actionGo" + android:inputType="number" + android:maxLength="4" /> + + </com.google.android.material.textfield.TextInputLayout> + + <TextView + android:id="@+id/currencyView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:visibility="invisible" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/amountView" + app:layout_constraintTop_toTopOf="@+id/amountView" + tools:text="TESTKUDOS" + tools:visibility="visible" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/confirmWithdrawalButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:backgroundTint="@color/green" + android:drawableLeft="@drawable/ic_withdraw" + android:drawableTint="?attr/colorOnPrimarySurface" + android:text="@string/withdraw_button_confirm" + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/amountView" + tools:ignore="RtlHardcoded" + tools:visibility="visible" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/cashier/src/main/res/layout/fragment_config.xml b/cashier/src/main/res/layout/fragment_config.xml new file mode 100644 index 0000000..47ec6f9 --- /dev/null +++ b/cashier/src/main/res/layout/fragment_config.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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"> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/urlView" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:hint="@string/config_bank_url" + app:endIconMode="clear_text" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textUri" /> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/usernameView" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:hint="@string/config_username" + app:boxBackgroundMode="outline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/urlView"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="text" /> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/passwordView" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:hint="@string/config_password" + app:boxBackgroundMode="outline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/usernameView" + app:passwordToggleEnabled="true"> + + <com.google.android.material.textfield.TextInputEditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textWebPassword" /> + + </com.google.android.material.textfield.TextInputLayout> + + <Button + android:id="@+id/saveButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:text="@string/config_button_save" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/passwordView" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="@+id/saveButton" + app:layout_constraintEnd_toEndOf="@+id/saveButton" + app:layout_constraintStart_toStartOf="@+id/saveButton" + app:layout_constraintTop_toTopOf="@+id/saveButton" + tools:visibility="visible" /> + + <TextView + android:id="@+id/demoView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="@dimen/default_margin" + android:text="@string/config_demo_hint" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/saveButton" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/cashier/src/main/res/layout/fragment_error.xml b/cashier/src/main/res/layout/fragment_error.xml new file mode 100644 index 0000000..ac34c85 --- /dev/null +++ b/cashier/src/main/res/layout/fragment_error.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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:id="@+id/frameLayout" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".withdraw.ErrorFragment"> + + <ImageView + android:id="@+id/imageView" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="32dp" + android:src="@drawable/ic_error" + app:layout_constraintBottom_toTopOf="@+id/textView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:ignore="ContentDescription" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/textView" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="32dp" + android:text="@string/transaction_error" + android:textAlignment="center" + android:textColor="@color/red" + app:autoSizeMaxTextSize="42sp" + app:autoSizeTextType="uniform" + app:layout_constraintBottom_toTopOf="@+id/backButton" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/imageView" /> + + <Button + android:id="@+id/backButton" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:text="@string/transaction_button_back" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/cashier/src/main/res/layout/fragment_transaction.xml b/cashier/src/main/res/layout/fragment_transaction.xml new file mode 100644 index 0000000..3affbf2 --- /dev/null +++ b/cashier/src/main/res/layout/fragment_transaction.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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" + tools:context=".withdraw.TransactionFragment"> + + <TextView + android:id="@+id/introView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="32dp" + android:gravity="center_horizontal" + android:text="@string/transaction_intro" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/amountView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="32dp" + android:gravity="center_horizontal" + android:textAppearance="@style/TextAppearance.AppCompat.Headline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/introView" + tools:text="50 KUDOS" /> + + <ImageView + android:id="@+id/qrCodeView" + android:layout_width="256dp" + android:layout_height="256dp" + android:layout_margin="32dp" + android:keepScreenOn="true" + android:visibility="invisible" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/amountView" + tools:ignore="ContentDescription" + tools:src="@drawable/ic_arrow" + tools:visibility="visible" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="@+id/qrCodeView" + app:layout_constraintEnd_toEndOf="@+id/qrCodeView" + app:layout_constraintStart_toStartOf="@+id/qrCodeView" + app:layout_constraintTop_toTopOf="@+id/qrCodeView" /> + + <Button + android:id="@+id/cancelButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:backgroundTint="@color/red" + android:text="@string/transaction_abort" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/confirmButton" + app:layout_constraintHorizontal_chainStyle="spread_inside" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/qrCodeView" + app:layout_constraintVertical_bias="1.0" /> + + <Button + android:id="@+id/confirmButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:backgroundTint="@color/green" + android:enabled="false" + android:text="@string/transaction_confirm" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/cancelButton" + tools:enabled="true" /> + +</androidx.constraintlayout.widget.ConstraintLayout> |