diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-20 22:56:16 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-20 22:58:10 +0200 |
commit | eb9594079589a0126c3fb5f9a2f6ecd56950eebc (patch) | |
tree | 2ab7544f0230c78c1df15ac9e75ed5d47ac87bbf /app/src/main/res | |
parent | e63f231bc8583db065213a07019223f7c122c9fd (diff) | |
download | merchant-terminal-android-eb9594079589a0126c3fb5f9a2f6ecd56950eebc.tar.gz merchant-terminal-android-eb9594079589a0126c3fb5f9a2f6ecd56950eebc.tar.bz2 merchant-terminal-android-eb9594079589a0126c3fb5f9a2f6ecd56950eebc.zip |
prototype of payment request flow
Diffstat (limited to 'app/src/main/res')
27 files changed, 162 insertions, 40 deletions
diff --git a/app/src/main/res/drawable/ic_history_black_24dp.xml b/app/src/main/res/drawable/ic_history_black_24dp.xml new file mode 100644 index 0000000..a61de1b --- /dev/null +++ b/app/src/main/res/drawable/ic_history_black_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml index a0ad202..2408e30 100644 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <vector - xmlns:android="http://schemas.android.com/apk/res/android" - android:height="108dp" - android:width="108dp" - android:viewportHeight="108" - android:viewportWidth="108"> + android:height="108dp" + android:width="108dp" + android:viewportHeight="108" + android:viewportWidth="108" + xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#008577" android:pathData="M0,0h108v108h-108z"/> <path android:fillColor="#00000000" android:pathData="M9,0L9,108" diff --git a/app/src/main/res/drawable/ic_move_money_24dp.xml b/app/src/main/res/drawable/ic_move_money_24dp.xml new file mode 100644 index 0000000..349f48f --- /dev/null +++ b/app/src/main/res/drawable/ic_move_money_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M19,3L4.99,3c-1.11,0 -1.98,0.9 -1.98,2L3,19c0,1.1 0.88,2 1.99,2L19,21c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,15h-4c0,1.66 -1.35,3 -3,3s-3,-1.34 -3,-3L4.99,15L4.99,5L19,5v10zM16,10h-2L14,7h-4v3L8,10l4,4 4,-4z"/> +</vector> diff --git a/app/src/main/res/layout/fragment_merchant_history.xml b/app/src/main/res/layout/fragment_merchant_history.xml new file mode 100644 index 0000000..92abdf7 --- /dev/null +++ b/app/src/main/res/layout/fragment_merchant_history.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="15dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <View + android:id="@+id/header" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/list_history" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:scrollbars="vertical" + android:layout_marginTop="47dp" android:layout_marginEnd="75dp" + android:layout_marginBottom="17dp"/> + + <Button + android:text="Button" + android:layout_width="match_parent" + android:layout_height="wrap_content" android:id="@+id/button2"/> + </LinearLayout> +</androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/fragment_merchant_settings.xml b/app/src/main/res/layout/fragment_merchant_settings.xml new file mode 100644 index 0000000..8fcf233 --- /dev/null +++ b/app/src/main/res/layout/fragment_merchant_settings.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="15dp" + tools:context=".MerchantSettings"> + + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + </LinearLayout> +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_process_payment.xml b/app/src/main/res/layout/fragment_process_payment.xml index b1d9813..0ff8257 100644 --- a/app/src/main/res/layout/fragment_process_payment.xml +++ b/app/src/main/res/layout/fragment_process_payment.xml @@ -1,14 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" + 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=".ProcessPayment"> + android:layout_margin="15dp" + tools:context=".ProcessPayment" android:id="@+id/frameLayout2"> - <!-- TODO: Update blank fragment layout --> - <TextView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:text="@string/hello_blank_fragment"/> + android:id="@+id/constraintLayout"> + <Button + android:id="@+id/button_cancel_payment" + android:text="Cancel Payment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent"/> + <ImageView + android:layout_width="269dp" + android:layout_height="275dp" tools:src="@tools:sample/backgrounds/scenic[16]" + android:id="@+id/qrcode" app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="32dp" + android:background="#CEC02424"/> + <TextView + android:text="Please scan QR Code or use NFC to pay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/textView2" + android:textSize="24sp" + android:layout_marginTop="15dp" + app:layout_constraintTop_toBottomOf="@+id/qrcode" + android:layout_marginBottom="15dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toTopOf="@+id/text_view_amount" + app:layout_constraintStart_toStartOf="parent" + android:textAlignment="center"/> + <TextView + android:text="AMOUNT" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/text_view_amount" android:textSize="30sp" + app:layout_constraintStart_toStartOf="parent" + android:layout_marginTop="39dp" + app:layout_constraintTop_toBottomOf="@+id/textView2" + app:layout_constraintBottom_toTopOf="@+id/text_view_order_reference" + app:layout_constraintEnd_toEndOf="parent" + tools:text="10.49 Eur" + /> + <TextView + android:text="Order Reference: 1234" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/text_view_order_reference" android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@+id/text_view_amount" android:layout_marginBottom="8dp" + app:layout_constraintBottom_toTopOf="@id/button_cancel_payment" app:layout_constraintStart_toStartOf="parent" + android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" + android:layout_marginEnd="8dp" + android:textAlignment="center"/> + </androidx.constraintlayout.widget.ConstraintLayout> </FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/history_row.xml b/app/src/main/res/layout/history_row.xml new file mode 100644 index 0000000..a67cf37 --- /dev/null +++ b/app/src/main/res/layout/history_row.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/historyText" + android:textSize="20sp"> +</TextView>
\ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index 92ca611..84d4010 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -17,7 +17,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="@dimen/nav_header_vertical_spacing" - app:srcCompat="@mipmap/ic_launcher_round" + app:srcCompat="@mipmap/ic_taler_logo_round" android:contentDescription="@string/nav_header_desc" android:id="@+id/imageView"/> @@ -25,13 +25,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="@dimen/nav_header_vertical_spacing" - android:text="@string/nav_header_title" + android:text="GNU Taler" android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/nav_header_subtitle" + android:text="Merchant Terminal" android:id="@+id/textView"/> </LinearLayout> diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index 9df2b3d..9ce4a06 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -6,33 +6,15 @@ <group android:checkableBehavior="single"> <item android:id="@+id/nav_home" - android:icon="@drawable/ic_menu_camera" + android:icon="@drawable/ic_move_money_24dp" android:title="@string/menu_home"/> <item - android:id="@+id/nav_gallery" - android:icon="@drawable/ic_menu_gallery" - android:title="@string/menu_gallery"/> + android:id="@+id/nav_history" + android:icon="@drawable/ic_history_black_24dp" + android:title="History"/> <item - android:id="@+id/nav_slideshow" - android:icon="@drawable/ic_menu_slideshow" - android:title="@string/menu_slideshow"/> - <item - android:id="@+id/nav_tools" + android:id="@+id/nav_settings" android:icon="@drawable/ic_menu_manage" - android:title="@string/menu_tools"/> + android:title="Settings"/> </group> - - <item android:title="Communicate"> - <menu> - <item - android:id="@+id/nav_share" - android:icon="@drawable/ic_menu_share" - android:title="@string/menu_share"/> - <item - android:id="@+id/nav_send" - android:icon="@drawable/ic_menu_send" - android:title="@string/menu_send"/> - </menu> - </item> - </menu> diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo.xml b/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo.xml new file mode 100644 index 0000000..c4a603d --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo_round.xml new file mode 100644 index 0000000..c4a603d --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_taler_logo_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..75273ec --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-hdpi/ic_taler_logo.png b/app/src/main/res/mipmap-hdpi/ic_taler_logo.png Binary files differnew file mode 100644 index 0000000..eaecede --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_taler_logo.png diff --git a/app/src/main/res/mipmap-hdpi/ic_taler_logo_round.png b/app/src/main/res/mipmap-hdpi/ic_taler_logo_round.png Binary files differnew file mode 100644 index 0000000..caa2a3e --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_taler_logo_round.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..a450287 --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-mdpi/ic_taler_logo.png b/app/src/main/res/mipmap-mdpi/ic_taler_logo.png Binary files differnew file mode 100644 index 0000000..e1f7374 --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_taler_logo.png diff --git a/app/src/main/res/mipmap-mdpi/ic_taler_logo_round.png b/app/src/main/res/mipmap-mdpi/ic_taler_logo_round.png Binary files differnew file mode 100644 index 0000000..e92d2d3 --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_taler_logo_round.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..a5e875c --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_taler_logo.png b/app/src/main/res/mipmap-xhdpi/ic_taler_logo.png Binary files differnew file mode 100644 index 0000000..5ca4409 --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_taler_logo.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_taler_logo_round.png b/app/src/main/res/mipmap-xhdpi/ic_taler_logo_round.png Binary files differnew file mode 100644 index 0000000..12b9056 --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_taler_logo_round.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..e9d1fc9 --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_taler_logo.png b/app/src/main/res/mipmap-xxhdpi/ic_taler_logo.png Binary files differnew file mode 100644 index 0000000..a786efa --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_taler_logo.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_taler_logo_round.png b/app/src/main/res/mipmap-xxhdpi/ic_taler_logo_round.png Binary files differnew file mode 100644 index 0000000..b22a84e --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_taler_logo_round.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..f8037d1 --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo.png b/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo.png Binary files differnew file mode 100644 index 0000000..0e9df6a --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo_round.png Binary files differnew file mode 100644 index 0000000..6bef9bd --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_taler_logo_round.png diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index eaa7bf9..b6345a1 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -5,8 +5,16 @@ app:startDestination="@id/createPayment"> <fragment android:id="@+id/createPayment" android:name="net.taler.merchantpos.CreatePayment" - android:label="fragment_create_payment" tools:layout="@layout/fragment_create_payment"/> + android:label="Request Payment" tools:layout="@layout/fragment_create_payment"> + <action android:id="@+id/action_createPayment_to_processPayment" app:destination="@id/processPayment"/> + </fragment> <fragment android:id="@+id/processPayment" android:name="net.taler.merchantpos.ProcessPayment" - android:label="fragment_process_payment" tools:layout="@layout/fragment_process_payment"/> - <action android:id="@+id/action_global_processPayment" app:destination="@id/processPayment"/> + android:label="Payment Prompt" tools:layout="@layout/fragment_process_payment"/> + <fragment android:id="@+id/merchantHistory" android:name="net.taler.merchantpos.MerchantHistory" + android:label="Payment History" tools:layout="@layout/fragment_merchant_history"/> + <action android:id="@+id/action_global_merchantHistory" app:destination="@id/merchantHistory"/> + <action android:id="@+id/action_global_createPayment" app:destination="@id/createPayment"/> + <fragment android:id="@+id/merchantSettings" android:name="net.taler.merchantpos.MerchantSettings" + android:label="Merchant Settings" tools:layout="@layout/fragment_merchant_settings"/> + <action android:id="@+id/action_global_merchantSettings" app:destination="@id/merchantSettings"/> </navigation>
\ No newline at end of file |