Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical Line in Android Studio

I don't know why but sometime in Android Studio Editor, it shows vertical line as shown in screenshot below.

Don't know about other editor but it happens in Android Studio.

So why it is showing and how to hide it?

Android Studio shows Vertical Line in Editor

like image 610
Jagruttam Panchal Avatar asked Jan 11 '17 07:01

Jagruttam Panchal


People also ask

What is vertical line in Android Studio?

That line historically represents the margin of A4 paper, which is useful only if you need to print the code. Old school says that you should keep your code inside that margin, to guarantee much portability.

What is the vertical line in IDE?

It's called a visual guide (Settings - Editor - Code Style). It helps you to see how wide is each line of code, and to keep the lines within this limit. You can configure the IDE to wrap the lines automatically when the lines are too long.

How do I add a line in Android?

This example demonstrates how do I draw a line in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml.

How do you draw a straight line on android?

quadTo(mX, mY, (x + mX)/2, (y + mY)/2); You will be able to draw straight lines.


2 Answers

That line historically represents the margin of A4 paper, which is useful only if you need to print the code. Old school says that you should keep your code inside that margin, to guarantee much portability.

But.. nowadays in the real life, it makes no sense to me! Because we always use advanced editors, bigger displays, and I never needed to print any single line of code.

So, if you want to do it:

Newer versions

Editor -> General -> Appearance -> Show hard wrap guide

Older versions

Editor -> General -> Appearance -> Show right margin

or

Editor -> Appearance -> Show right margin

For Mac

To remove line go to:- Preference-> Editor -> General -> Appearance -> Show hard wrap and visual guides. Uncheck it to remove.

like image 175
Luca Corradi Avatar answered Sep 20 '22 20:09

Luca Corradi


It is as follows in the newer version of Android Studio:

Editor -> General -> Appearance -> Show hard wrap guide

like image 25
theThapa Avatar answered Sep 21 '22 20:09

theThapa