Android Studio Tab Spacing

Android Studio

Android Studio Problem Overview


How can I change spacing in Android Studio to use tabs instead of spaces? I tried Preference -> Editor but I don't see the option there. I'm using Android Studio for Mac

Android Studio Solutions


Solution 1 - Android Studio

Type in 'spac' in the search panel of the settings view.

You will find Editor -> Code Style->Java->Tabs and Indents->Use tab character.

Solution 2 - Android Studio

This is a little weird, but others may have the same issue I did.

Yes, follow the above directions, and do the normal changes in the config file. And guess what? it looks like it's still making spaces instead of tabs, even though the settings say TABS, not spaces!

Turn on "show whitespaces" (Editor -> General -> Appearance). And then turn it off. Looks like this is enough to reset the editor so that it is now following the rules you set in the preferences.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChristopher FranciscoView Question on Stackoverflow
Solution 1 - Android StudionhaarmanView Answer on Stackoverflow
Solution 2 - Android StudioSMBiggsView Answer on Stackoverflow