From 75251e38704757913fb8238d975deeec949f0811 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 3 May 2020 01:06:36 +0200 Subject: [PATCH] cache more pages in Pager --- app/src/main/java/info/nightscout/androidaps/MainActivity.kt | 1 + app/src/main/res/layout/overview_loop_pumpstatus_layout.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 778d2cf985..b5c7990ed7 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -190,6 +190,7 @@ class MainActivity : NoSplashAppCompatActivity() { } } main_pager.adapter = pageAdapter + main_pager.offscreenPageLimit = 8 // This may cause more memory consumption checkPluginPreferences(main_pager) // Tabs diff --git a/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml b/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml index 8e50b85e0d..98c0d0bd62 100644 --- a/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml +++ b/app/src/main/res/layout/overview_loop_pumpstatus_layout.xml @@ -43,7 +43,8 @@ android:id="@+id/overview_pumpstatuslayout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" > + android:orientation="horizontal" + android:visibility="gone">