No line break after @Override annotation?
android-studio, ide, java
Solution
File -> Settings -> Code Style -> Wrapping and Braces -> Method annotations and set to Do not wrap.
Note: Changing the setting will not actually reformat all existing ones. It just won't be wrapped when inserted automatically by the IDE, as you want in your question. This applies to all annotations for methods.
Problem
When overriding methods, android studio automatically inserts a line break after the `@Override` annotation. How can I have the `IDE` insert the `@Override` without the line break and have it immediately followed by the method declaration (ie on the same line ?): ``` @Override public Fragment getItem(int position) { ... } ``` instead of: ``` @Override public Fragment getItem(int position) { ... } ```