Activity and location of fragments in android studio

just a quick question, because I'm a little confused by this:

I have fragment_main.xmlAND activity_main.xmlcreated by android studio. Using the graphical layout, I can drag and drop buttons, not just a fragment or activity. The difference is that the fragment allows me to move things freely, but activity_main does not.

Why is that? Is activity_main locked or something?

Also, should I leave a space activity_main.xmland just work with fragments?

Thank!

+4
source share
1 answer

, , xml . , , , . , .

+1

Source: https://habr.com/ru/post/1539213/


All Articles