i want to add footer on all teh tabs in my application to show weather



i have added footer in tAb activty footer is shown in all tabs but problem is that it comes over the data so data at bottom is not visible.


here is my code of xml



<android.support.v4.widget.DrawerLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/relativ_layout"

tools:context=".MainActivity" >

<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff8800"

android:orientation="horizontal" >
</TabWidget>

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0" >



</FrameLayout>

<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" >


</android.support.v4.view.ViewPager>



</LinearLayout>



</TabHost>

// footer *************************************************
<RelativeLayout
android:id="@+id/footer"
android:layout_width="match_parent"

android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#F00000"
android:gravity="bottom" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="Fixed Footer"
android:textColor="#000"
android:textSize="20sp" />
</RelativeLayout>

//********************************************

</RelativeLayout>








<FrameLayout
android:id="@+id/Frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >



</FrameLayout>



<LinearLayout
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:orientation="vertical"
android:background="@android:color/white">




<RelativeLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:clickable="true"
android:focusable="true"
android:background="@drawable/navigationdrawer"


>



<TextView
android:id="@+id/txtemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shivam1692@gmail.com"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"/>

</RelativeLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15dp"
android:paddingTop="20dp"

android:textColor="@android:color/darker_gray"
android:textStyle="bold"
android:paddingLeft="10dp"
android:paddingRight="16dp"
android:text="TITLE" />

<ListView
android:id="@+id/list_slider"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:listSelector="@drawable/list_selector"
android:divider="@color/list_divider"
android:choiceMode="singleChoice"
android:dividerHeight="0.3dp"
/>



</LinearLayout>

</android.support.v4.widget.DrawerLayout>


please tell me how add footer below the data.


No comments:

Post a Comment