I have a TextView defined as
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Semita"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
But I don't like the closing tag on the same indentation level as the attributes. When I hit backspace I'd like it to look like:
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Semita"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
which is what I'd like, I instead get:
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Semita"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
where the /> is on the same level as the attributes. How can I change this behavior?
Place the cursor before the /> and press Shift + Tab if you are using Mac.
Pressing Tab adds 4 spaces and pressing Shift + Tab moves 4 spaces back.
There is auto-indentation if you have already your closing tags, simply press "Ctrl+Alt+I". This will auto-indent whatever block you are highlighting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With