vlad silviu Farcas vlad silviu Farcas - 1 month ago 10
Android Question

Can't add any items to activity_main.xml in Android Studio

In Android Studio, I can't add any items from Palette to activity_main.xml in Design view. It just won't let me drag and drop them. Any idea why this happens?

Here is the PrintScreen:


Answer

According to new design method followed in android studio for android development you cannot add any elements to the activity_main.xml. Rather you should add them to content_main.xml.

You can learn more about it from this answer.