How can I remove entire RelativeLayout which is added as header to my another layout. Here is my code:
tour.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/relativeVideoTour"
android:layout_height="232dp" >
<ImageButton
android:id="@+id/play_button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
android:background="@drawable/video_img"
android:contentDescription="@null" />
<ImageButton
android:id="@+id/play_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/play"
android:contentDescription="@null" />
</RelativeLayout>
I added this layout to my list view.
ListView m_listView = (ListView) listView.findViewById(R.id.list);
m_listView.addHeaderView(getActivity().getLayoutInflater().inflate(R.layout.tour, null));
m_listView.setHeaderDividersEnabled(false);
m_relativeVideoTour = (RelativeLayout) listView.findViewById(R.id.relativeVideoTour);
m_relativeVideoTour.setVisibility(View.INVISIBLE);
m_relativeVideoTour.setVisibility(View.GONE);
By using above code, images of those buttons in tour.xml are not shown .. but the white space still maintain on the top of the list.
How can I remove entire layout of tour with white space(want to show only listview)
Please help me.. Thanks in advance...