Skip to content

Commit 50a11b3

Browse files
authored
fix: 修复自动收缩标题栏不生效
1 parent 1b863c3 commit 50a11b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/me/ghui/v2er/module/home/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
249249
int statusBarHeight = Utils.getStatusBarHeight();
250250

251251
// When toolbar is scrolled up and would be under status bar, hide it
252-
if (verticalOffset > 0 && Math.abs(verticalOffset) >= toolbarHeight - statusBarHeight) {
252+
if (verticalOffset < 0 && Math.abs(verticalOffset) >= toolbarHeight - statusBarHeight) {
253253
mToolbar.setVisibility(View.INVISIBLE);
254254
} else {
255255
mToolbar.setVisibility(View.VISIBLE);

0 commit comments

Comments
 (0)