aboutsummaryrefslogtreecommitdiff
path: root/wallet/src/main/res
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-04-15 09:37:37 -0300
committerTorsten Grote <t@grobox.de>2020-04-15 09:37:37 -0300
commit8b7947a14349877120e74127a3949a73f917c3d2 (patch)
tree5cc34b7233eff3402e94690f0c75013edd964251 /wallet/src/main/res
parent10e49b74e29df50d8ac3e24438195063918ee265 (diff)
downloadtaler-android-8b7947a14349877120e74127a3949a73f917c3d2.tar.gz
taler-android-8b7947a14349877120e74127a3949a73f917c3d2.tar.bz2
taler-android-8b7947a14349877120e74127a3949a73f917c3d2.zip
[wallet] use floating action button for scan action
This prepares a layout change for display of balances and transactions.
Diffstat (limited to 'wallet/src/main/res')
-rw-r--r--wallet/src/main/res/layout/fragment_settings.xml2
-rw-r--r--wallet/src/main/res/layout/fragment_show_balance.xml72
-rw-r--r--wallet/src/main/res/menu/activity_main_drawer.xml4
-rw-r--r--wallet/src/main/res/navigation/nav_graph.xml4
4 files changed, 21 insertions, 61 deletions
diff --git a/wallet/src/main/res/layout/fragment_settings.xml b/wallet/src/main/res/layout/fragment_settings.xml
index fdd0120..27c5f57 100644
--- a/wallet/src/main/res/layout/fragment_settings.xml
+++ b/wallet/src/main/res/layout/fragment_settings.xml
@@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical"
- tools:context=".Settings">
+ tools:context=".SettingsFragment">
<TextView
diff --git a/wallet/src/main/res/layout/fragment_show_balance.xml b/wallet/src/main/res/layout/fragment_show_balance.xml
index 82b5106..3f4aa2e 100644
--- a/wallet/src/main/res/layout/fragment_show_balance.xml
+++ b/wallet/src/main/res/layout/fragment_show_balance.xml
@@ -13,79 +13,43 @@
~ 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"
+<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">
<androidx.recyclerview.widget.RecyclerView
- android:id="@+id/balancesList"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
+ android:id="@+id/mainList"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:visibility="gone"
- app:layout_constraintBottom_toTopOf="@+id/scanButton"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintVertical_bias="0.0"
- app:layout_constraintVertical_chainStyle="packed"
- tools:layout_height="200dp"
tools:listitem="@layout/list_item_balance"
tools:visibility="visible" />
<TextView
- android:id="@+id/balancesEmptyState"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
+ android:id="@+id/mainEmptyState"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:autoLink="web"
android:gravity="center"
android:padding="16dp"
android:text="@string/balances_empty_state"
android:textSize="18sp"
android:visibility="gone"
- app:layout_constraintBottom_toTopOf="@+id/scanButton"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- tools:visibility="gone" />
-
- <androidx.constraintlayout.widget.Barrier
- android:id="@+id/barrier"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:barrierAllowsGoneWidgets="false"
- app:barrierDirection="bottom"
- app:constraint_referenced_ids="balancesList, balancesEmptyState" />
-
- <Button
- android:id="@+id/scanButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:drawableLeft="@drawable/ic_scan_qr"
- android:padding="16dp"
- android:text="@string/button_scan_qr_code"
- app:layout_constraintBottom_toTopOf="@+id/testWithdrawButton"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/barrier"
- app:layout_constraintVertical_chainStyle="packed"
- tools:ignore="RtlHardcoded" />
+ tools:visibility="visible" />
- <Button
- android:id="@+id/testWithdrawButton"
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/mainFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
+ android:layout_gravity="bottom|end"
android:layout_marginEnd="16dp"
- android:padding="16dp"
- android:text="@string/withdraw_button_testkudos"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/scanButton"
- tools:visibility="visible" />
+ android:layout_marginBottom="16dp"
+ android:src="@drawable/ic_scan_qr"
+ app:backgroundTint="@color/colorPrimary"
+ app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
+ app:layout_dodgeInsetEdges="bottom"
+ app:tint="?attr/colorOnPrimary" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/wallet/src/main/res/menu/activity_main_drawer.xml b/wallet/src/main/res/menu/activity_main_drawer.xml
index 49119f8..896ff69 100644
--- a/wallet/src/main/res/menu/activity_main_drawer.xml
+++ b/wallet/src/main/res/menu/activity_main_drawer.xml
@@ -25,10 +25,6 @@
android:title="@string/balances_title"
tools:checked="true" />
<item
- android:id="@+id/nav_history"
- android:icon="@drawable/ic_history_black_24dp"
- android:title="@string/menu_history" />
- <item
android:id="@+id/nav_settings"
android:icon="@drawable/ic_settings"
android:title="@string/menu_settings" />
diff --git a/wallet/src/main/res/navigation/nav_graph.xml b/wallet/src/main/res/navigation/nav_graph.xml
index f6d8598..d4257b9 100644
--- a/wallet/src/main/res/navigation/nav_graph.xml
+++ b/wallet/src/main/res/navigation/nav_graph.xml
@@ -23,7 +23,7 @@
<fragment
android:id="@+id/showBalance"
- android:name="net.taler.wallet.BalanceFragment"
+ android:name="net.taler.wallet.MainFragment"
android:label="@string/balances_title"
tools:layout="@layout/fragment_show_balance">
<action
@@ -54,7 +54,7 @@
tools:layout="@layout/fragment_payment_successful" />
<fragment
android:id="@+id/settings"
- android:name="net.taler.wallet.Settings"
+ android:name="net.taler.wallet.SettingsFragment"
android:label="Settings"
tools:layout="@layout/fragment_settings" />