Let me explain,
When i format the code [CTRL+ALT+L].
Expected like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public static void myCustomFun() {
//some code here
}
}
BUT I GOT
Result like this:
public static void myCustomFun() {
//some code here
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
Can any one tell me what the issue with android studio(V-3.5.3)?
The problem will be that you have stated you want all public or all static methods above other methods. Or you may have "keep overridden methods together". There are a few options.
Check the arrangement tab to see what you have set:
(see 21,22 on my screenshot, it declares static methods above instance methods).