From 0ffacd2f2b7e922fa512408dd28c44ea3085dd36 Mon Sep 17 00:00:00 2001 From: Jonathan GUILLOT Date: Tue, 14 May 2024 23:15:24 +0200 Subject: [PATCH 1/8] Replace hardcoded welcome string Add "app_welcome" as a new string resource for this purpose. BTW, add the translation for this new resource in French. --- mobile/src/main/res/layout/fragment_welcome.xml | 2 +- mobile/src/main/res/values-fr/strings.xml | 1 + mobile/src/main/res/values/strings.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/res/layout/fragment_welcome.xml b/mobile/src/main/res/layout/fragment_welcome.xml index 793eadec..fb6fd6de 100644 --- a/mobile/src/main/res/layout/fragment_welcome.xml +++ b/mobile/src/main/res/layout/fragment_welcome.xml @@ -21,7 +21,7 @@ android:id="@+id/textViewTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Welcome to FreeOTP 2.0" + android:text="@string/app_welcome" android:textSize="26dp" android:layout_marginTop="24dp" app:layout_constraintLeft_toLeftOf="parent" diff --git a/mobile/src/main/res/values-fr/strings.xml b/mobile/src/main/res/values-fr/strings.xml index 409c9cb4..f3e51a13 100644 --- a/mobile/src/main/res/values-fr/strings.xml +++ b/mobile/src/main/res/values-fr/strings.xml @@ -20,6 +20,7 @@ FreeOTP + Bienvenue dans FreeOTP 2.0 Ok diff --git a/mobile/src/main/res/values/strings.xml b/mobile/src/main/res/values/strings.xml index a10441df..18daa982 100644 --- a/mobile/src/main/res/values/strings.xml +++ b/mobile/src/main/res/values/strings.xml @@ -20,6 +20,7 @@ FreeOTP + Welcome to FreeOTP 2.0 Ok From 7d5b29afa0f5f26ac2e2a7ee4255355748f53138 Mon Sep 17 00:00:00 2001 From: Jonathan GUILLOT Date: Wed, 8 May 2024 23:45:46 +0200 Subject: [PATCH 2/8] Use tools:listitem in RecyclerView to preview token items --- mobile/src/main/res/layout/activity_main.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/res/layout/activity_main.xml b/mobile/src/main/res/layout/activity_main.xml index 30277e0f..84f31336 100644 --- a/mobile/src/main/res/layout/activity_main.xml +++ b/mobile/src/main/res/layout/activity_main.xml @@ -62,6 +62,7 @@ app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:layout_behavior="@string/appbar_scrolling_view_behavior" app:spanCount="@integer/columns" + tools:listitem="@layout/token" /> - \ No newline at end of file + From 6501a9514279f0702ac257d18ad6c8a9d8b3b594 Mon Sep 17 00:00:00 2001 From: Jonathan GUILLOT Date: Wed, 8 May 2024 23:46:35 +0200 Subject: [PATCH 3/8] Add margins to manual add activity And move away app bar from the scroll view. It is already the case in main activity for example. Also remove ConstraintLayout nesting Button which seems a bit superfluous. --- .../main/res/layout/activity_manual_add.xml | 347 +++++++++--------- 1 file changed, 172 insertions(+), 175 deletions(-) diff --git a/mobile/src/main/res/layout/activity_manual_add.xml b/mobile/src/main/res/layout/activity_manual_add.xml index 3e374d19..f43d4fd9 100644 --- a/mobile/src/main/res/layout/activity_manual_add.xml +++ b/mobile/src/main/res/layout/activity_manual_add.xml @@ -1,212 +1,209 @@ - - + - - + - - - - - - - + android:theme="@style/ToolbarStyle" + /> + + - - + android:layout_margin="@dimen/margin" + android:orientation="vertical" + > + - - - - - - - + android:gravity="center" + android:text="@string/manual_secret_text" + android:textSize="18sp" + android:textStyle="bold" /> + + + + + - - - + android:gravity="center" + android:text="@string/manual_type_text" + android:textSize="18sp" + android:textStyle="bold" /> - - - - - + + + + + + + + - + android:gravity="center" + android:text="@string/manual_digits_text" + android:textSize="18sp" + android:textStyle="bold" /> + + + + + + + + + + - - - + android:gravity="center" + android:text="@string/manual_algorithm" + android:textSize="18sp" + android:textStyle="bold" /> - - - - - - + + + + - - - - - - + - + +