feat:移除不必要的类

This commit is contained in:
max
2024-04-02 16:52:12 +08:00
parent 7c0665b9ce
commit 52bfc9636b
4 changed files with 0 additions and 52 deletions

View File

@@ -1,49 +0,0 @@
package com.chwl.app.ui.behavior;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import com.google.android.material.appbar.AppBarLayout;
/**
* 此文件不能删引用到AppLayout下面的
* create by lvzebiao @2020/1/7
*/
public class FixAppBarBehavior extends AppBarLayout.Behavior {
public FixAppBarBehavior() {
}
public FixAppBarBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dxConsumed, int dyConsumed, int
dxUnconsumed, int dyUnconsumed, int type) {
super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type);
stopNestedScrollIfNeeded(dyUnconsumed, child, target, type);
}
@Override
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dx, int dy, int[] consumed, int type) {
super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type);
stopNestedScrollIfNeeded(dy, child, target, type);
}
private void stopNestedScrollIfNeeded(int dy, AppBarLayout child, View target, int type) {
if (type == ViewCompat.TYPE_NON_TOUCH) {
final int currOffset = getTopAndBottomOffset();
if ((dy < 0 && currOffset == 0)
|| (dy > 0 && currOffset == -child.getTotalScrollRange())) {
ViewCompat.stopNestedScroll(target, ViewCompat.TYPE_NON_TOUCH);
}
}
}
}

View File

@@ -893,7 +893,6 @@
<string name="privacy_setting">隱私設置</string> <string name="privacy_setting">隱私設置</string>
<string name="notice_setting">通知提醒設置</string> <string name="notice_setting">通知提醒設置</string>
<string name="behavior_fix_app_bar">com.chwl.app.ui.behavior.FixAppBarBehavior</string>
<string name="label_search_history">搜索記錄</string> <string name="label_search_history">搜索記錄</string>
<string name="label_room_history">進房記錄</string> <string name="label_room_history">進房記錄</string>

View File

@@ -893,7 +893,6 @@
<string name="privacy_setting">隱私設置</string> <string name="privacy_setting">隱私設置</string>
<string name="notice_setting">通知提醒設置</string> <string name="notice_setting">通知提醒設置</string>
<string name="behavior_fix_app_bar">com.chwl.app.ui.behavior.FixAppBarBehavior</string>
<string name="label_search_history">搜索記錄</string> <string name="label_search_history">搜索記錄</string>
<string name="label_room_history">進房記錄</string> <string name="label_room_history">進房記錄</string>

View File

@@ -883,7 +883,6 @@
<string name="privacy_setting">Privacy Setting</string> <string name="privacy_setting">Privacy Setting</string>
<string name="notice_setting">Notification Setting</string> <string name="notice_setting">Notification Setting</string>
<string name="behavior_fix_app_bar">com.chwl.app.ui.behavior.FixAppBarBehavior</string>
<string name="label_search_history">Search history</string> <string name="label_search_history">Search history</string>
<string name="label_room_history">Room entry history</string> <string name="label_room_history">Room entry history</string>