Suppress "WeakerAccess" warning in field annotated with @BindView

Naturally, ButterKnife fields cannot be declared private, even though Android Lint does not know this. However, instead of all my fields it looks like this:

@SuppressWarnings("WeakerAccess") @BindView(R.id.foo) Bar mFoo;

I prefer a cleaner approach

@BindView(R.id.foo) Bar mFoo;

Ideally, I would like to avoid the warning WeakerAccessfor the entire class or disable it altogether in my validation profile, because this is a useful warning.

Is there a way to suppress this warning automatically for any field annotated using @BindViewin Android Studio?

+4
source share

Source: https://habr.com/ru/post/1688872/


All Articles