I have an activity with five different layouts. I want to scroll through each layout. I looked at the CardScrollView example thinking I could put each layout on a different card, but it isn't clear to me how I setup a card with a layout. I see how I can add text or images, but not set the entire content of a card to my layout. Or maybe there is a different way to accomplish my overall objective.
Asked
Active
Viewed 61 times
1 Answers
0
The getView
method of CardScrollAdapter
can return any kind of view, not just those from Card
instances. Instead of creating Card
objects, use a LayoutInflater
to inflate your own layouts, populate the widgets with values, and then return the root view from getView
.

Tony Allevato
- 6,429
- 1
- 29
- 34