Android Studio - Cannot Drag And Drop Button
I just created a new project, blank activity. If I go into the interface for the activity_main.xml I cannot drag and drop any widgets. I tried changing the theme, still nothing. He
Solution 1:
Android Studio changed the layout activity_main.xml
and made it as a container for things like FloatingActionButton
, ToolBar
.. so you can't drag and drop buttons there. They created another xml file called content_main.xml
where you can add all your other views. They include the content_main inside activity_main by
<include layout="@layout/content_main" />
Solution 2:
I noticed that adding something programmatically to the xml file (click "text" button on the bottom left) then made it so the ui worked... but only after I added something programmatically.
Post a Comment for "Android Studio - Cannot Drag And Drop Button"