Skip to content

Commit

Permalink
[Fix] Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghai committed Apr 4, 2020
1 parent 17fb5bc commit e3dba12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package me.zhanghai.android.fastscroll;

import android.annotation.SuppressLint;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
Expand All @@ -25,6 +26,7 @@
import androidx.appcompat.graphics.drawable.DrawableWrapper;
import androidx.core.graphics.drawable.DrawableCompat;

@SuppressLint("RestrictedApi")
class AutoMirrorDrawable extends DrawableWrapper {

public AutoMirrorDrawable(@NonNull Drawable drawable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ protected boolean superOnTouchEvent(@NonNull MotionEvent event) {
}

@Override
@SuppressLint("RestrictedApi")
protected int computeVerticalScrollRange() {
return FastScrollNestedScrollView.this.computeVerticalScrollRange();
}

@Override
@SuppressLint("RestrictedApi")
protected int computeVerticalScrollOffset() {
return FastScrollNestedScrollView.this.computeVerticalScrollOffset();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package me.zhanghai.android.fastscroll.sample;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
Expand Down Expand Up @@ -82,6 +83,7 @@ private static class Behavior extends AppBarLayout.ScrollingViewBehavior {
public boolean onMeasureChild(@NonNull CoordinatorLayout parent, @NonNull View child,
int parentWidthMeasureSpec, int widthUsed,
int parentHeightMeasureSpec, int heightUsed) {
@SuppressLint("RestrictedApi")
WindowInsetsCompat parentInsets = parent.getLastWindowInsets();
if (parentInsets != null) {
int parentHeightSize = MeasureSpec.getSize(parentHeightMeasureSpec);
Expand Down

0 comments on commit e3dba12

Please sign in to comment.