views:

72

answers:

1

I have 2 ways of displaying ListView data. I have a class for each type of row. I do not create the rows in an xml layout. (Each row is derived from View and does custom drawing).

When I switch from 1 type of row to another how do I get the ListView to layout properly with the correct row heights, and refresh?

Is View.forceLayout() on the right track?

Thanks, Gerry

A: 

do you use adapter to fill your ListView? In my code i have some adapter and when i have to change row type i set adapter to null and then to new adapter type.

carlovv
Yes, I extend BaseAdapter. I was using a boolean to get my adapter to return 1 or the other view type. I will try 2 seperate adapers.
Gerry
Bingo, that worked like a charm
Gerry