Khemraj Sharma
Khemraj Sharma

Reputation: 58974

Disable layout width and height auto import feature and suggestion

How can I disable Android Studio layout editor feature of auto import android:layout_width and android:layout_height?

I want, when I write some new component, it come with no attributes.

  1. This is what comes automatically when writing new component.

comes

  1. This is what I want

want

I want this because-

Yes all component must have both height and width, I always use my App Custom Styles for every component.

For Example every parent element has both height and width match_parent, so I just set my style ViewParent style for all parent element views. and I don't specify height and width everywhere. I use styles for better maintainability.

Upvotes: 1

Views: 318

Answers (1)

letner
letner

Reputation: 649

Go to Android Studio preferences -> Editor -> General -> Smart Keys.

Then uncheck Insert required attributes on tag completion.

enter image description here

Upvotes: 2

Related Questions