0

When I edit layout.xml I input "<"Text and press Ctrl+Space, see TextView in a list and press Enter to add TextView-element on the file. IDE insert the following:

<TextView android:layout_width="" android:layout_height=""/>

How to edit this code template that IDE insert code in the following format:

<TextView
    android:layout_width=""
    android:layout_height=""
    />
ilyamuromets
  • 403
  • 1
  • 7
  • 18
  • Hi @ilyamuromets please refer to [this](http://developer.android.com/guide/topics/ui/declaring-layout.html) link to get more understanding about layout and how to use them. – Programming Pirate Mar 02 '16 at 15:33
  • Please read more about programming for the android platform before you ask questions. Knowledge is the key – Niza Siwale Mar 02 '16 at 16:08
  • You didn't understand me. Perhaps because of my poor English. I want to change the template on which IDE inserts autocompletion. – ilyamuromets Mar 02 '16 at 16:10

1 Answers1

0

I found the answer to my question:

In Android Studio File -> Settings -> Editor -> Code Style -> XML. Then click on Android Tab, find title "Layout Files", set "Wrap Attributes" to "Wrap always" and check three items.

ilyamuromets
  • 403
  • 1
  • 7
  • 18