Can't set line spacing to '1' in Android Studio (anymore ?)

Viewed 1616

Not sure if it's related to a recent update, but I suddenly can't get single line spacing in the Android Studio Editor anymore. If I try to change it to 1, it let's me set it, but when I push 'Apply' it snaps back to 1.5. Tried it with different fonts, but same thing. Am I missing something obvious ?

enter image description here

2 Answers

I solved the problem in this way:

  • Open settings in Android Studio and go to Editor>Color&Fonts>Font. Now change the font or font size if you want and click on "Save As..." button and save the new scheme with a different name (In my case: Darcula E).

  • If you are using Windows open File Explorer and navigate to Android studio's data folder and open config and then colors folder. In my case: C:\Users\MyUserName\.AndroidStudio2.3\config\colors

  • Select and open the scheme that you created (In my case: Darcula E.icls) with Notepad. It looks like this:

`<scheme name="Darcula E" version="142" parent_scheme="Darcula">
  <metaInfo>
    <property name="created">2017-10-05T19:30:40</property>
    <property name="ide">AndroidStudio</property>
    <property name="ideVersion">2.3.3.0</property>
    <property name="modified">2017-10-05T19:30:50</property>
    <property name="originalScheme">Darcula</property>
  </metaInfo>
  <option name="LINE_SPACING" value="1.5" />
  <option name="EDITOR_FONT_SIZE" value="30" />
  <option name="CONSOLE_FONT_NAME" value="Monospaced" />
  <option name="CONSOLE_LINE_SPACING" value="1.0" />
  <option name="EDITOR_FONT_NAME" value="Source Code Pro" />
</scheme>`

Simply change LINE_SPACING value to "1.0".

  • Now close and open Android Studio again. Done!
Related