diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/selectable_background.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_order.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/list_item_order.xml | 15 | ||||
-rw-r--r-- | app/src/main/res/navigation/nav_graph.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/values-night/colors.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values-v21/styles.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 9 |
8 files changed, 56 insertions, 16 deletions
diff --git a/app/src/main/res/drawable/selectable_background.xml b/app/src/main/res/drawable/selectable_background.xml new file mode 100644 index 0000000..b82de92 --- /dev/null +++ b/app/src/main/res/drawable/selectable_background.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@color/selectedBackground" android:state_activated="true" /> + <item android:drawable="@android:color/transparent" /> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_order.xml b/app/src/main/res/layout/fragment_order.xml index bcf8be8..136d1e7 100644 --- a/app/src/main/res/layout/fragment_order.xml +++ b/app/src/main/res/layout/fragment_order.xml @@ -63,6 +63,28 @@ app:layout_constraintStart_toStartOf="parent" /> <Button + android:id="@+id/plusButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:minWidth="48dp" + android:text="+1" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/minusButton" + tools:ignore="HardcodedText" /> + + <Button + android:id="@+id/minusButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:minWidth="48dp" + android:text="-1" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/restartButton" + tools:ignore="HardcodedText" /> + + <Button android:id="@+id/reconfigureButton" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -70,7 +92,7 @@ android:backgroundTint="@color/bottomButtons" android:text="@string/button_reconfigure" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@+id/restartButton" /> + app:layout_constraintStart_toEndOf="@+id/plusButton" /> <Button android:id="@+id/historyButton" diff --git a/app/src/main/res/layout/list_item_order.xml b/app/src/main/res/layout/list_item_order.xml index 5dc2f86..03b15a8 100644 --- a/app/src/main/res/layout/list_item_order.xml +++ b/app/src/main/res/layout/list_item_order.xml @@ -4,9 +4,9 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="8dp" - android:paddingTop="8dp" - android:paddingEnd="8dp"> + android:background="@drawable/selectable_background" + android:minHeight="48dp" + android:padding="8dp"> <TextView android:id="@+id/quantity" @@ -14,8 +14,10 @@ android:layout_height="wrap_content" android:gravity="end" android:minWidth="24dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" + app:layout_constraintTop_toTopOf="@+id/name" + app:layout_constraintVertical_bias="0.0" tools:text="31" /> <TextView @@ -24,6 +26,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/price" app:layout_constraintStart_toEndOf="@+id/quantity" app:layout_constraintTop_toTopOf="parent" @@ -33,8 +36,10 @@ android:id="@+id/price" android:layout_width="wrap_content" android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" + app:layout_constraintTop_toTopOf="@+id/name" + app:layout_constraintVertical_bias="0.0" tools:text="23.42" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index f615ba2..dc4015f 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -42,7 +42,7 @@ android:id="@+id/merchantSettings" android:name="net.taler.merchantpos.config.MerchantConfigFragment" android:label="Merchant Settings" - tools:layout="@layout/fragment_merchant_settings"/> + tools:layout="@layout/fragment_merchant_settings" /> <fragment android:id="@+id/configFetcher" @@ -53,6 +53,11 @@ android:id="@+id/action_configFetcher_to_merchantSettings" app:destination="@id/merchantSettings" app:popUpToInclusive="true" /> + <action + android:id="@+id/action_configFetcher_to_order" + app:destination="@id/order" + app:launchSingleTop="true" + app:popUpTo="@+id/order" /> </fragment> <fragment diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..47721b4 --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="selectedBackground">#363636</color> +</resources> diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml deleted file mode 100644 index e546804..0000000 --- a/app/src/main/res/values-v21/styles.xml +++ /dev/null @@ -1,7 +0,0 @@ -<resources> - <style name="AppTheme.NoActionBar"> - <item name="windowActionBar">false</item> - <item name="windowNoTitle">true</item> - <item name="android:statusBarColor">@android:color/transparent</item> - </style> -</resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 10354c5..3ed8874 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -4,6 +4,7 @@ <color name="colorPrimaryDark">#5D4037</color> <color name="colorAccent">#FFEB3B</color> + <color name="selectedBackground">#DADADA</color> <color name="bottomButtons">#9E9D24</color> <color name="logoutButton">#C62828</color> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9eac8b0..4445a01 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -3,14 +3,19 @@ <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorOnPrimary">@android:color/white</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> + <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> + <item name="android:statusBarColor">@android:color/transparent</item> </style> - <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/> - <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/> + + <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> + + <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> </resources> |