diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-20 22:55:02 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-20 22:55:02 +0200 |
commit | 884fa0b47579bef3cf29450acdce73c2ee5304fe (patch) | |
tree | 5da6fd067379ffa1947efd87d233957aa545bd7c /app/src/main/res/layout | |
download | wallet-android-884fa0b47579bef3cf29450acdce73c2ee5304fe.tar.gz wallet-android-884fa0b47579bef3cf29450acdce73c2ee5304fe.tar.bz2 wallet-android-884fa0b47579bef3cf29450acdce73c2ee5304fe.zip |
import into repo
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/layout/app_bar_main.xml | 41 | ||||
-rw-r--r-- | app/src/main/res/layout/balance_row.xml | 31 | ||||
-rw-r--r-- | app/src/main/res/layout/content_main.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_payment_successful.xml | 38 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_prompt_payment.xml | 114 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_settings.xml | 19 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_show_balance.xml | 51 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_show_history.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/layout/nav_header_main.xml | 37 |
10 files changed, 394 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..ac9a123 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.drawerlayout.widget.DrawerLayout + 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/drawer_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fitsSystemWindows="true" + tools:openDrawer="start"> + + <include + layout="@layout/app_bar_main" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <com.google.android.material.navigation.NavigationView + android:id="@+id/nav_view" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="start" + android:fitsSystemWindows="true" + app:headerLayout="@layout/nav_header_main" + app:menu="@menu/activity_main_drawer"/> + +</androidx.drawerlayout.widget.DrawerLayout> diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml new file mode 100644 index 0000000..0e95cb0 --- /dev/null +++ b/app/src/main/res/layout/app_bar_main.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<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_height="wrap_content" + android:layout_width="match_parent" + android:theme="@style/AppTheme.AppBarOverlay"> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + app:popupTheme="@style/AppTheme.PopupOverlay"/> + <me.zhanghai.android.materialprogressbar.MaterialProgressBar + android:id="@+id/progress_bar" + android:layout_width="match_parent" + android:layout_height="4dp" + android:indeterminate="true" + app:mpb_progressStyle="horizontal" + app:mpb_useIntrinsicPadding="false" + android:layout_alignParentBottom="true" + style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"/> + </RelativeLayout> + + </com.google.android.material.appbar.AppBarLayout> + + <include layout="@layout/content_main" android:id="@+id/include"/> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/balance_row.xml b/app/src/main/res/layout/balance_row.xml new file mode 100644 index 0000000..75f143c --- /dev/null +++ b/app/src/main/res/layout/balance_row.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/balance_amount" + android:textSize="40sp" tools:text="100.50"> + </TextView> + + <Space android:layout_width="10sp" + android:layout_height="match_parent"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/balance_currency" + android:textSize="20sp" tools:text="TESTKUDOS"> + </TextView> + + </LinearLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml new file mode 100644 index 0000000..112382e --- /dev/null +++ b/app/src/main/res/layout/content_main.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout + 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" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + tools:showIn="@layout/app_bar_main" + tools:context=".MainActivity"> + + <fragment + android:id="@+id/nav_host_fragment" + android:name="androidx.navigation.fragment.NavHostFragment" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:defaultNavHost="true" + app:navGraph="@navigation/nav_graph" /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_payment_successful.xml b/app/src/main/res/layout/fragment_payment_successful.xml new file mode 100644 index 0000000..64ddad9 --- /dev/null +++ b/app/src/main/res/layout/fragment_payment_successful.xml @@ -0,0 +1,38 @@ +<?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=".PaymentSuccessful"> + + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Space android:layout_width="match_parent" android:layout_height="0dp" + android:layout_weight="1"/> + + <TextView + android:layout_gravity="center" + android:layout_width="match_parent" + android:textAlignment="center" + android:layout_height="50dp" + android:text="Payment was Successful" + android:autoSizeTextType="uniform" + android:textColor="@android:color/holo_green_dark"/> + + + <Space android:layout_width="match_parent" android:layout_height="0dp" + android:layout_weight="1"/> + <Button + android:text="Go Back" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/button_success_back"/> + + </LinearLayout> + +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_prompt_payment.xml b/app/src/main/res/layout/fragment_prompt_payment.xml new file mode 100644 index 0000000..8d01126 --- /dev/null +++ b/app/src/main/res/layout/fragment_prompt_payment.xml @@ -0,0 +1,114 @@ +<?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=".PromptPayment"> + + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/prompt_payment_details"> + + <Space android:layout_width="match_parent" + android:layout_height="15dp" + android:layout_weight="1"/> + + <TextView + android:text="Order Summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:id="@+id/textView2"/> + + <TextView + android:text="One Cappuccino" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="25sp" + android:layout_gravity="center" + android:id="@+id/order_summary"/> + + <Space android:layout_width="match_parent" + android:layout_height="25dp"/> + + + <TextView + android:text="Amount" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:id="@+id/textView3"/> + <TextView + android:text="10 TESTKUDOS" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="25sp" + android:layout_gravity="center" + android:id="@+id/order_amount"/> + + <LinearLayout android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_gravity="center" + android:id="@+id/order_fees_box"> + + <TextView + android:text="(plus additional " + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center"/> + + <TextView + android:text="0.5 TESTKUDOS" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:id="@+id/order_fees_amount"/> + + <TextView + android:text=" payment fees)" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + /> + + </LinearLayout> + + <Space android:layout_width="match_parent" + android:layout_height="15dp" + android:layout_weight="1"/> + + <TextView + android:text="Balance Insufficient!" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="25sp" + android:layout_gravity="center" + android:id="@+id/balance_insufficient_warning" android:textColor="@android:color/holo_red_dark"/> + + + <Space android:layout_width="match_parent" + android:layout_height="15dp" + android:layout_weight="1"/> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <Button android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="Abort Payment" + android:id="@+id/button_abort_payment"/> + + <Space android:layout_width="15dp" android:layout_height="match_parent" + android:layout_weight="1"/> + + <Button android:layout_width="wrap_content" android:layout_height="wrap_content" + android:id="@+id/button_confirm_payment" + android:text="Confirm Payment"/> + </LinearLayout> + + </LinearLayout> +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml new file mode 100644 index 0000000..d675d98 --- /dev/null +++ b/app/src/main/res/layout/fragment_settings.xml @@ -0,0 +1,19 @@ +<?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="10dp" + tools:context=".Settings"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:text="Reset Wallet (Dangerous!)" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:id="@+id/button_reset_wallet_dangerously"/> + </LinearLayout> +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_show_balance.xml b/app/src/main/res/layout/fragment_show_balance.xml new file mode 100644 index 0000000..e4d2e81 --- /dev/null +++ b/app/src/main/res/layout/fragment_show_balance.xml @@ -0,0 +1,51 @@ +<?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_balances" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:scrollbars="vertical"/> + + <TextView + android:id="@+id/list_balances_placeholder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:text="There is no digital cash in your wallet." + tools:visibility="gone"/> + + <Space android:layout_width="match_parent" android:layout_height="20dp"/> + + <Button + android:text="Withdraw TESTKUDOS" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/button_withdraw_testkudos"/> + <Button + android:text="Pay via QR Code" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/button_pay_qr"/> + <Button + android:text="Pay via NFC" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/button_pay_nfc"/> + </LinearLayout> +</androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/fragment_show_history.xml b/app/src/main/res/layout/fragment_show_history.xml new file mode 100644 index 0000000..d730425 --- /dev/null +++ b/app/src/main/res/layout/fragment_show_history.xml @@ -0,0 +1,13 @@ +<?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" + tools:context=".WalletHistory"> + + <TextView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="The history of wallet operations will eventually be shown here. Currently this feature isn't implemented, sorry!"/> + +</FrameLayout>
\ 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 new file mode 100644 index 0000000..92ca611 --- /dev/null +++ b/app/src/main/res/layout/nav_header_main.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="@dimen/nav_header_height" + android:background="@drawable/side_nav_bar" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + android:theme="@style/ThemeOverlay.AppCompat.Dark" + android:orientation="vertical" + android:gravity="bottom"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingTop="@dimen/nav_header_vertical_spacing" + app:srcCompat="@mipmap/ic_launcher_round" + android:contentDescription="@string/nav_header_desc" + android:id="@+id/imageView"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="@dimen/nav_header_vertical_spacing" + android:text="@string/nav_header_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/nav_header_subtitle" + android:id="@+id/textView"/> + +</LinearLayout> |