Reputation: 95
I start to learn android . I noticed that my form widgets doesn't work I cant drag it to my layout. How to fix it ? or is it a bug .
Upvotes: 0
Views: 7570
Reputation: 49
I had a similar problem and the answer @ Android Studio - Cannot Drag and Drop Button helped me solve it.
In short, you can't drag widgets into activity_main.xml
. So make a new file called content_main.xml
, and then add the line:
<include layout="@layout/content_main"/>
to your activity_main.xml
file. Then you can drag items into the content_main.xml
file, and they will appear in your activity_main.xml
layout. Hope that helps!
Upvotes: 2