I am writing an Android application for Android OS 2.2+.
I have following structure :
ListView : View that is being used for MenuDrawer
ListAdapter : Adapter which acts as source for ListView
For menu drawer I am using : https://github.com/SimonVT/android-menudrawer
On Android 2.2:

On Android 4.0:

Issue is style for category and title is getting interchanged !!
<style name="MenuDrawerCategoryStyle">
<item name="android:textStyle">bold</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">14sp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:background">@drawable/menu_drawer_category_bg</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
</style>
<style name="MenuDrawerTitleStyle">
<item name="android:background">@drawable/abs__list_selector_holo_dark</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">18sp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">32dp</item>
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:drawablePadding">16dp</item>
<item name="android:gravity">center_vertical</item>
</style>
Am I missing something ?
Thank you in advance.
I got the issue. It was related with the technique of caching I was using for inflated views. You have to be careful about using caching in an Adapter. I was caching the element views independent of the style of the element and that was causing issue.