diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java index 1c52c9d5d..7f9904ad4 100755 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java @@ -512,14 +512,12 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene ViewGroup main = (ViewGroup) ViewUtils.$$(view, R.id.main); ScrollView mainView = (ScrollView) ViewUtils.$$(main, R.id.scroll_view); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - mainView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> { - if (mActionGroup != null && mHeader != null) { - //noinspection IntegerDivisionInFloatingPointContext - setLightStatusBar(mActionGroup.getY() - mHeader.findViewById(R.id.header_content).getPaddingTop() / 2 < scrollY); - } - }); - } + mainView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> { + if (mActionGroup != null && mHeader != null) { + //noinspection IntegerDivisionInFloatingPointContext + setLightStatusBar(mActionGroup.getY() - mHeader.findViewById(R.id.header_content).getPaddingTop() / 2 < scrollY); + } + }); View progressView = ViewUtils.$$(main, R.id.progress_view); mTip = (TextView) ViewUtils.$$(main, R.id.tip); mViewTransition = new ViewTransition(mainView, progressView, mTip); @@ -542,17 +540,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene mActionGroup = (ViewGroup) ViewUtils.$$(mHeader, R.id.action_card); mDownload = (TextView) ViewUtils.$$(mActionGroup, R.id.download); mRead = (TextView) ViewUtils.$$(mActionGroup, R.id.read); - try { - GalleryProvider2 galleryProvider = new EhGalleryProvider(requireContext(), mGalleryInfo); - galleryProvider.start(); - int startPage = galleryProvider.getStartPage(); - if (startPage != 0) { - mRead.setText(getString(R.string.read_from, startPage + 1)); - } - galleryProvider.stop(); - } catch (Exception ignore) { - } mUploader.setOnClickListener(this); mCategory.setOnClickListener(this); mOtherActions.setOnClickListener(this); diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 80c4c434f..47e44c316 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -66,7 +66,6 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="end" - android:background="@android:color/transparent" android:fitsSystemWindows="false" android:maxWidth="@dimen/drawer_max_width" /> diff --git a/app/src/main/res/layout/activity_preference.xml b/app/src/main/res/layout/activity_preference.xml index dfc4a9c4c..98544d9b2 100644 --- a/app/src/main/res/layout/activity_preference.xml +++ b/app/src/main/res/layout/activity_preference.xml @@ -1,12 +1,12 @@ - + app:fitSystemWindowsInsets="start|end" + android:orientation="vertical"> - + android:layout_height="match_parent"> - \ No newline at end of file + + + + \ No newline at end of file