From 1243964145685f9496b119e71d776efe0e668d5b Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 8 Nov 2022 16:52:15 -0700 Subject: [PATCH] Fix the GUI displaying under the loading blocklists screen on restart. https://redmine.stoutner.com/issues/621 --- .../activities/MainWebViewActivity.java | 3 +++ .../asynctasks/PopulateBlocklists.java | 15 ++------------- .../layout/main_framelayout_bottom_appbar.xml | 17 +++++++---------- .../res/layout/main_framelayout_top_appbar.xml | 12 +++++------- 4 files changed, 17 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index a21848a5..1b34ffd8 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -589,6 +589,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Initially disable the sliding drawers. They will be enabled once the blocklists are loaded. drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); + // Initially hide the user interface so that only the blocklist loading screen is shown (if reloading). + drawerLayout.setVisibility(View.GONE); + // Initialize the web view pager adapter. webViewPagerAdapter = new WebViewPagerAdapter(getSupportFragmentManager()); diff --git a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java index 99ccd45f..af2bea14 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java +++ b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java @@ -23,11 +23,9 @@ import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import android.view.View; -import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; -import androidx.appcompat.widget.Toolbar; import androidx.drawerlayout.widget.DrawerLayout; import com.stoutner.privacybrowser.R; @@ -74,14 +72,8 @@ public class PopulateBlocklists extends AsyncTask + + android:orientation="horizontal" > - + - + + android:layout_width="match_parent" /> @@ -228,4 +225,4 @@ android:textAlignment="center" android:textColor="?android:attr/textColorPrimary" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/main_framelayout_top_appbar.xml b/app/src/main/res/layout/main_framelayout_top_appbar.xml index 362df1a2..afb43e19 100644 --- a/app/src/main/res/layout/main_framelayout_top_appbar.xml +++ b/app/src/main/res/layout/main_framelayout_top_appbar.xml @@ -1,7 +1,7 @@ + - + - + @@ -230,4 +228,4 @@ android:textAlignment="center" android:textColor="?android:attr/textColorPrimary" /> - \ No newline at end of file + -- 2.45.2