Hi,
I have created four tabs using tabhost, and placed four listviews in each like below:
public class prem extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
String[] names = new String[] { "Pr"};
this.setListAdapter(new ArrayAdapter<String>(this,
R.layout.simple_list_item_checked, names));
}
Problem is I have created background images for each listview but when I scroll the listview goes black, I know that I should add android:cacheColorHint="#00000000" to the xml file to make the listview transparent, so I have created a new xml and id and tried to add android:cacheColorHint="#00000000" in the xml to make transparent, but it just force closes;
this.setListAdapter(new ArrayAdapter(this, R.layout.list_item, R.id.listb, names));
?xml version="1.0" encoding="utf-8"?>
LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView android:text="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30px"></TextView>
<ListView android:id="@+id/listb"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</ListView>