rraallvv
rraallvv

Reputation: 2943

How to add/remove levels of indentation on Android Studio

I know there is an option for auto-indentation but I’d like to have a bit of control on how many the levels of indentation I have, or at least to be able to set those parameters somewhere.

This is what I get with auto indentation:

gl.glClearColor(Color.red(mBackgroundColor) / 255f,
        Color.green(mBackgroundColor) / 255f,
        Color.blue(mBackgroundColor) / 255f,
        Color.alpha(mBackgroundColor) / 255f);

This is what I want:

gl.glClearColor(Color.red(mBackgroundColor) / 255f,
    Color.green(mBackgroundColor) / 255f,
    Color.blue(mBackgroundColor) / 255f,
    Color.alpha(mBackgroundColor) / 255f);

Currently I have to select one by one the three lines below gl.glClearColor(... and remove the additional tab character by hand.

enter image description here


Edit

These are my settings, I'm using tab characters with smart tabs disable, but I still get two tab characters in some cases.

enter image description here

Upvotes: 0

Views: 2238

Answers (1)

Hafiz Muneeb
Hafiz Muneeb

Reputation: 307

  1. Go to Settings -> Editor -> Code Style
  2. Unmark the checkbox Enable EditorConfig support
  3. Go to Settings -> Editor -> Code Style -> Java
  4. Change the value of Continuation Indent as u need

Upvotes: 1

Related Questions