21

I want to remove the right hand margin line in Android Studio/IntelliJ. I have pointed out the line in question in the image below.

I searched Android studio settings and search Google many times.. but I couldn't find anything.

How do I remove that line?

enter image description here

Rylander
  • 19,449
  • 25
  • 93
  • 144
HWANG
  • 249
  • 4
  • 10

5 Answers5

15

Easy solution to this :)

Go to File, then Other Settings, then Default Settings. Choose Code Style from the list on the Left, then General. Change the Right Margin attribute to be 0. This will remove the line.

Hope this helps. Here's a picture:

Alex K
  • 8,269
  • 9
  • 39
  • 57
  • 3
    I think something might have changed. I can no longer set this to zero, it jumps back to 100, or if I press down, I cannot get lower than 1. Instead I changed this to 1000. Get it out the way. – WORMSS Nov 19 '14 at 10:10
  • 1
    thanks buddy . I was not able to understand what it was. – Shekhar Sep 29 '15 at 11:41
  • This is not working in Android Studio 3.0, worked for me on earlier versions. – Pranav Karnik Nov 27 '17 at 11:03
11

IntelliJ IDEA 2017

  • Ctrl + Shift + A
  • type "Appearance: Show right"
  • switch the toggle to OFF using Enter or mouse left click.

    Appearance: Show right margin

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
11

For Android studio 3.2 this setting is now called: "Show hard wrap guide (configured in Code Style options)"

It is located at: Settings > Editor > General > Appearance

Mustapha Hamade
  • 111
  • 1
  • 5
  • 2
    Correct. The silly developers named it "Hard wrap and visual guides" instead of simply calling it the "print margin". – Nav Aug 12 '22 at 08:28
2

Look in the editor.xml file for addtional settings. The file is located (Windows 7) here:

C:\Users\YOURNAME\.AndroidStudio\config\options\editor.xml

Look for the setting, IS_RIGHT_MARGIN_SHOWN. Its default value is true. Change it to false and restart Android Studio. This should hide the right margin line.

Brian Davis
  • 229
  • 1
  • 12
  • 1
    This works! Just make sure that you are using the correct version in **.AndroidStudio**, so for _1.5_ version it should be **.AndroidStudio1.5**, for _2_ it would be **.AndroidStudio2** etc.. – MosabJ Apr 16 '16 at 00:34
2

I found that Android Studio 3 wasn't accepting blank or 0 value in the attribute as per in Alex's answer.

Try following steps: From menu bar, select File > Settings > Editor > General > Appearance and uncheck the Show right margin... checkbox.

Removing the right margin in Android Studio

Community
  • 1
  • 1
Pranav Karnik
  • 3,318
  • 3
  • 35
  • 47
  • 1
    This is the right answer. Android Studio creators are a bunch of people who don't understand design. – Nav Jul 08 '23 at 10:17