1

Since I cannot have the ButterKnife binded views to be private (ButterKnife itself denies it), I would like to avoid the lint check of "Declaration of access can be weaker" only when I have the ButterKnife annotation "BindView" over a field. In all the others cases I want to keep having the Lint to notify me about accesses that can be weaker.

I this case I want to automatically avoid the Lint warning

 @BindView(R.id.dl_trader)
    NDrawerLayout mDrawerLayout;

PS = I would like to avoid to manual insert the @SuppressWarnings("WeakerAccess") every time I bind a view with ButterKnife. Is there any other automatic way?

Ryan M
  • 18,333
  • 31
  • 67
  • 74
Link 88
  • 553
  • 8
  • 27
  • Android Studio should not complain about that, because view fields will be used from generated code (from the same package, so package private access is OK). – italankin Jul 23 '19 at 11:16

0 Answers0