Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a quick way to manually rearrange methods in Android Studio?

I have recently switched from Eclipse to Android Studio, and I miss being able to rearrange the methods in a .java file by simply dragging and dropping them in the class structure window. Is there a way to do this or something similar in Android Studio? (Obviously I can cut and paste in the editor window, but I was hoping there might be a more efficient way.)

like image 812
stantronic Avatar asked Jul 08 '15 08:07

stantronic


1 Answers

You can use Move Statement Up/Down shortcuts to rearrange methods quickly. Put your caret on the method name and press Ctrl-Shift-Up/Down (Cmd-Shift-Up/Down on Mac OS X) to swap it with either the previous or next method.

like image 152
yole Avatar answered Oct 21 '22 07:10

yole