Marked many (too many) variables as final

This commit is contained in:
Avently 2020-07-12 03:59:47 +03:00
parent a7fbe05a73
commit b2164ce5fc
13 changed files with 295 additions and 273 deletions

View file

@ -23,13 +23,13 @@ public final class FlingBehavior extends AppBarLayout.Behavior {
}
private boolean allowScroll = true;
private Rect globalRect = new Rect();
private final Rect globalRect = new Rect();
@Override
public boolean onInterceptTouchEvent(CoordinatorLayout parent, AppBarLayout child, MotionEvent ev) {
ViewGroup playQueue = child.findViewById(R.id.playQueuePanel);
final ViewGroup playQueue = child.findViewById(R.id.playQueuePanel);
if (playQueue != null) {
boolean visible = playQueue.getGlobalVisibleRect(globalRect);
final boolean visible = playQueue.getGlobalVisibleRect(globalRect);
if (visible && globalRect.contains((int) ev.getRawX(), (int) ev.getRawY())) {
allowScroll = false;
return false;