Update layouts
This commit is contained in:
3 files changed
+20
-28
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<com.hippo.widget.SafeCoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/snackbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
app:consumeSystemWindowsInsets="start|end"
|
||||
app:edgeToEdge="true"
|
||||
app:fitSystemWindowsInsets="start|end">
|
||||
app:fitSystemWindowsInsets="start|end"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -24,11 +24,16 @@
|
||||
app:popupTheme="?attr/toolbarPopupTheme" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/snackbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</com.hippo.widget.SafeCoordinatorLayout>
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in new issue
Block a user