Formatting @BindView Code

Android Studio defaults to Butterknife format like this:

@BindView(R.id.text_view) 
TextView mTextView

Is there a way to tell Android Studio about the formatting of the code in one line, for example:

@BindView(R.id.text_view) TextView mTextView

If possible, I would like this rule to apply only to annotations @BindView.

+4
source share
1 answer

in Android Studio 2.3.3 File → Settings → Editor → Code Style → Java → Wrapper and Braces → Field Annotations → set to “Don't Wrap”

but this will not allow AS to put a new line in all field annotations.

, @BindView, , , AS . ,

@Nullable
String foo;

@BindView View bar;

, AS , .

+7

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


All Articles