Question

I'm trying to use a StackView in an Activity using a BaseAdapter for the views in the StackView. Nothing is showing up, even though my getView in the adapter is being called. Anyone have any luck getting StackView to work in an Activity? Know of an example?

Was it helpful?

Solution 2

I got it working. It's really picky about how you declare the size of your views. You can't do wrap_content if you are downloading images and populating your views, it seems to need to measure the layout beforehand, so if your views aren't loaded until later you will get nothing drawn. Specify a set height/width on your views that load into the StackView and you're good.

OTHER TIPS

Here is a tutorial that show stackview usage in Activity. It is in Turkish but source code is enough to understand: http://www.devandroidtr.org/?p=137

Updated

The sample tutorial in English: http://www.gdgankara.org/2012/03/25/stackview-non-widget-sample/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top