From b2bec204e214e6b077c4c1901d07fabec27104e9 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 1 Apr 2020 15:04:52 -0300 Subject: [pos] automatic code cleanup --- .../src/main/res/layout/activity_main.xml | 40 ++-- .../src/main/res/layout/app_bar_main.xml | 53 +++--- .../src/main/res/layout/fragment_categories.xml | 47 +++-- .../main/res/layout/fragment_config_fetcher.xml | 45 +++-- .../main/res/layout/fragment_merchant_config.xml | 203 ++++++++++----------- .../main/res/layout/fragment_merchant_history.xml | 17 +- .../src/main/res/layout/fragment_order.xml | 195 ++++++++++---------- .../src/main/res/layout/fragment_order_state.xml | 59 +++--- .../main/res/layout/fragment_payment_success.xml | 99 +++++----- .../src/main/res/layout/fragment_products.xml | 43 +++-- .../src/main/res/layout/fragment_refund.xml | 166 ++++++++--------- .../src/main/res/layout/list_item_category.xml | 25 ++- .../src/main/res/layout/list_item_history.xml | 134 +++++++------- .../src/main/res/layout/list_item_order.xml | 73 ++++---- .../src/main/res/layout/list_item_product.xml | 59 +++--- .../src/main/res/layout/nav_header_main.xml | 61 +++---- 16 files changed, 652 insertions(+), 667 deletions(-) (limited to 'merchant-terminal/src/main/res/layout') diff --git a/merchant-terminal/src/main/res/layout/activity_main.xml b/merchant-terminal/src/main/res/layout/activity_main.xml index 6523caa..1285b19 100644 --- a/merchant-terminal/src/main/res/layout/activity_main.xml +++ b/merchant-terminal/src/main/res/layout/activity_main.xml @@ -1,5 +1,4 @@ - - - + + layout="@layout/app_bar_main" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + 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" /> diff --git a/merchant-terminal/src/main/res/layout/app_bar_main.xml b/merchant-terminal/src/main/res/layout/app_bar_main.xml index 0254c71..f6d9912 100644 --- a/merchant-terminal/src/main/res/layout/app_bar_main.xml +++ b/merchant-terminal/src/main/res/layout/app_bar_main.xml @@ -1,5 +1,4 @@ - - + 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"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + app:popupTheme="@style/AppTheme.PopupOverlay" /> + android:id="@+id/navHostFragment" + 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:layout_insetEdge="top" + app:navGraph="@navigation/nav_graph" /> diff --git a/merchant-terminal/src/main/res/layout/fragment_categories.xml b/merchant-terminal/src/main/res/layout/fragment_categories.xml index a90585f..f81bf9a 100644 --- a/merchant-terminal/src/main/res/layout/fragment_categories.xml +++ b/merchant-terminal/src/main/res/layout/fragment_categories.xml @@ -1,5 +1,4 @@ - - + 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" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp"> + android:id="@+id/categoriesList" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:listitem="@layout/list_item_category" /> + android:id="@+id/progressBar" + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> diff --git a/merchant-terminal/src/main/res/layout/fragment_config_fetcher.xml b/merchant-terminal/src/main/res/layout/fragment_config_fetcher.xml index af7dcaf..55403bd 100644 --- a/merchant-terminal/src/main/res/layout/fragment_config_fetcher.xml +++ b/merchant-terminal/src/main/res/layout/fragment_config_fetcher.xml @@ -1,5 +1,4 @@ - - + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="16dp"> + android:id="@+id/titleView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:text="@string/config_fetching" + android:textAppearance="@style/TextAppearance.AppCompat.Headline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + android:id="@+id/progressBar" + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/titleView" /> diff --git a/merchant-terminal/src/main/res/layout/fragment_merchant_config.xml b/merchant-terminal/src/main/res/layout/fragment_merchant_config.xml index 2541887..b19f14c 100644 --- a/merchant-terminal/src/main/res/layout/fragment_merchant_config.xml +++ b/merchant-terminal/src/main/res/layout/fragment_merchant_config.xml @@ -1,5 +1,4 @@ - - + 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" + android:fillViewport="true"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:context=".config.MerchantConfigFragment"> + android:id="@+id/configUrlView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:hint="@string/config_url" + app:boxBackgroundColor="@android:color/transparent" + app:boxBackgroundMode="outline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textUri" /> + android:id="@+id/usernameView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:hint="@string/config_username" + app:boxBackgroundColor="@android:color/transparent" + app:boxBackgroundMode="outline" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/configUrlView"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="text" /> + android:id="@+id/passwordView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:hint="@string/config_password" + app:boxBackgroundColor="@android:color/transparent" + app:boxBackgroundMode="outline" + app:endIconMode="password_toggle" + app:layout_constraintEnd_toStartOf="@+id/forgetPasswordButton" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/usernameView"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textWebPassword" />