Typical application of a Gallery view component is like setting up a ListView + ArrayAdapter workflow. Is there any way to side-step this overhead by declaratively define a Gallery via XML?
<Gallery>
<TextView text="Screen 1 - Swipe to Next screen"/>
<TextView text="Screen 2 - Swipe to Prev screen"/>
</Gallery>
If this is not the case, what would it take to work?
You cannot define child views of an AdapterView (Galler, Spinner, ListView, …) directly in a layout xml file the way you did in your code.
However, there’s a way to avoid adapters. It has limited usability though. You can utilize
android:entriesattribute.Put a reference to an array resource as the attribute’s value.
The gallery will be populated with the texts in the array.
I guess you can use only texts to fill the Gallery (or any other AdapterView) this way, it won’t work for more complex views. You have to use an adapter to populate the Gallery with more complex items.