I have a listview in my activity and Action bar for activity set to transparent and UP navigation. Results are showing up properly but, the first item is showing up below actionBAR. Like the image below:
Below is the code I am using to make the bar transparent:
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
ActionBar actionBar = getActionBar();
actionBar.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
actionBar.setStackedBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setDisplayShowHomeEnabled(false);
setContentView(R.layout.invite_friends);
invite_friends.XML for listView:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bluebackground"
android:orientation="vertical" >
<ListView
android:id="@+id/person_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector" />
</LinearLayout>
Surprising that the listview is thinking it is full screen? How to solve this issue?
Thanks!