I looked at this question however, it did not help solve my problem:
I\'m using ActionBa
The problem was that the compiler did not tell me that I was using items that were not part of the compatiabiliy and were not avaliable in 2.3.3
Look at the lines I had to remove:
drawer_list_item.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall" <-Removed
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColor="#fff"
android:background="?android:attr/activatedBackgroundIndicator" <-Removed
android:minHeight="?android:attr/listPreferredItemHeightSmall"/> <-Removed
This is often occur due to unavailability of a drawable resource in res folder. Some times you just copy the drawable from other directory to you project's drawable folder, but forget to add this drawable from IDE's project explorer.
To support lower versions, instead of removing the following three parameters,
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
You can actually replace them with equivalent values/resources.
The equivalent values can be obtained from https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml
Now,
a) android:textAppearance="@android:style/TextAppearance.Medium"
b)
Download a selector from https://github.com/habzy/Test0011_DialerPad/blob/master/res/drawable/list_item_activated_background.xml
In the above project browse the resources in hdpi,mdpi etc and get files named list_activated_holo.9.png
Finally
android:background="@drawable/activated_background_holo_dark"
c) From the equivalent values obtained , we know that listPreferredItemHeightSmall is 48dip
android:minHeight="48dip"