Emmanuel Orubele
Emmanuel Orubele

Reputation: 13

Android Studio Activity_main.xml

How do you add ID into a text in the latest Android Studio from the design tab? I am able to create it through the XML text tab. I just cannot find how to do it in the design tab.

In the design environment, I can only edit the text or edit it from the TextView.

Upvotes: 0

Views: 128

Answers (3)

ashad
ashad

Reputation: 361

to add id to a text (or anything ) in design tab
1)Expand attributes if hidden
3)Expand Component tree if it was missing and select your textview to edit it
2)click on id and fill your id which you want to give to text
3)Click enter and go to xml and check if it was added or not

enter image description here

Upvotes: 1

user7609274
user7609274

Reputation:

In the design tab, look for "Attributes" next to Gradle at the top right. Click to expand it if it is hidden. You will find id and other attribute there.

Upvotes: 0

Agnohendrix
Agnohendrix

Reputation: 610

I'm pretty sure i have latest Android Studio version and the first voice i can see in the top right of the Attributes Tab is ID. Here's a screenshot:enter image description here

Upvotes: 0

Related Questions