I am comparing a ListView containing TextView items under Android Gingerbread (2.3.1) and ICS (4.0.3).
Using the Hierarchy View, I see that, for the same contents, the getBaseline() property is different in these 2 versions of Android.
Under Gingerbread, property getBaseline() is 23 for all items.
Under ICS, property getBaseline() is 58 for some items, 23 otherwise.
And the items with baseline 58 are invisible (the text content is there, just out of sight).
Do you know of anything that could have had modified the baseline ?
I believe I’ll need to fix this to make the text visible.
My code does some styling of the items, based on content, but I do not consciously manipulate the baseline.
The problem was solved by changing the xml item template.
I did some testing with a simpler layout (the RelativeLayout in http://www.curious-creature.org/2009/02/22/android-layout-tricks-1 ). It worked.
When I reverted back to the original (non functional) xml it also worked… Strange.
Anyway, the lesson is: don’t forget to check the xml.