Now that I know how to highlight syntax in EditText
, I would like to as how I can maintain auto-indenting like Notepad++
or Eclipse
. For eg:
public class Main{
public static void main(String[] args){
System.out.println("Hello, World!");
System.out.println("Hello, again!");
}
}
How do IDEs know how much space to add such that my second System.out.println()
is right underneath the first ?
Eclipse can auto-indent on demand. To do this, select a desired code piece, then press Ctrl+I ("Fix indentation").