Please do not use tabs for indentation.

If you want Eclipse to automatically format, you will need to configure the AnkiDroid specific setup that are in:
https://github.com/ankidroid/Anki-Android/tree/v2.1-dev/docs/code_conventions/eclipse
or manually follow what is described in:
https://github.com/ankidroid/Anki-Android/blob/v2.1-dev/docs/code_conventions/AnkiDroid_code_conventions.html