From 053ebbd70bb1b455d3a25819f0272643cfdcc8f0 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sun, 24 May 2020 21:27:49 +0100 Subject: [PATCH] dDisplay better error message if authentication fails on first run. Change lineHeight to lineSpacingMultiplier. --- app/src/main/java/io/lbry/browser/FirstRunActivity.java | 3 ++- app/src/main/res/layout/activity_first_run.xml | 5 ++++- app/src/main/res/layout/card_reward_driver.xml | 2 +- app/src/main/res/layout/list_item_editors_choice.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/FirstRunActivity.java b/app/src/main/java/io/lbry/browser/FirstRunActivity.java index 8197fd70..b4d42ee4 100644 --- a/app/src/main/java/io/lbry/browser/FirstRunActivity.java +++ b/app/src/main/java/io/lbry/browser/FirstRunActivity.java @@ -97,7 +97,8 @@ public class FirstRunActivity extends AppCompatActivity { } private void handleAuthenticationFailed() { - Toast.makeText(this, "Authentication failed.", Toast.LENGTH_LONG).show(); + findViewById(R.id.welcome_progress_bar).setVisibility(View.GONE); + ((TextView) findViewById(R.id.welcome_wait_text)).setText(R.string.startup_failed); } private void authenticate() { diff --git a/app/src/main/res/layout/activity_first_run.xml b/app/src/main/res/layout/activity_first_run.xml index 13ced125..181dc545 100644 --- a/app/src/main/res/layout/activity_first_run.xml +++ b/app/src/main/res/layout/activity_first_run.xml @@ -14,6 +14,7 @@ android:id="@+id/welcome_wait_container" android:layout_width="match_parent" android:layout_height="match_parent" + android:padding="24dp" android:visibility="gone"> diff --git a/app/src/main/res/layout/card_reward_driver.xml b/app/src/main/res/layout/card_reward_driver.xml index 95d22f64..93fb83b3 100644 --- a/app/src/main/res/layout/card_reward_driver.xml +++ b/app/src/main/res/layout/card_reward_driver.xml @@ -30,7 +30,7 @@ android:layout_marginLeft="8dp" android:layout_toRightOf="@id/reward_driver_icon" android:fontFamily="@font/inter" - android:lineHeight="18dp" + android:lineSpacingMultiplier="1.2" android:textColor="@color/white" android:textFontWeight="300" android:textSize="14sp" /> diff --git a/app/src/main/res/layout/list_item_editors_choice.xml b/app/src/main/res/layout/list_item_editors_choice.xml index c616dea1..e69a8873 100644 --- a/app/src/main/res/layout/list_item_editors_choice.xml +++ b/app/src/main/res/layout/list_item_editors_choice.xml @@ -53,7 +53,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" - android:lineHeight="14dp" + android:lineSpacingMultiplier="1.2" android:fontFamily="@font/inter" android:ellipsize="end" android:maxLines="8"