New line by entering a key in Android Studio?

I just started using Android Studio. When I edited "activity_main.xml", I can’t jump to a new line by pressing Enter. In addition, I tried to insert a new letter, but the new letter was simply replaced. So I clicked everywhere to enter the key job, and suddenly I got a new line. I do not know why.

It was so annoying. I pressed the wrong key? I do not want this to happen again.

I searched "new line, enter android studio key" to find out about this, but I did not find anything useful.

+2
source share
3 answers

Have you accidentally pressed the Insert key on your keyboard? Try clicking it again to see if this helps.

+4
source

I had the same problem because I recently changed the keyword tag and confirmed the form by pressing Enter .

But he did not notice that instead of checking the form, he changed the shortcut !

  • Go to File> Preferences ...> Keyboard
  • Check what action is assigned with Enter and delete it
  • Find the New Line action and add a new shortcut (return key)
  • Validate
+1
source

Go to File> Preferences> Editor> Appearance then Uncheck "Use block lock"

+1
source

Source: https://habr.com/ru/post/1213913/


All Articles