【发布时间】:2015-04-08 21:40:35
【问题描述】:
我在选项卡活动中添加了页脚页脚显示在所有选项卡中,但问题是它 位于 数据 上,因此底部的数据不可见。
这是我的xml代码
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
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>
请告诉我如何添加 页脚 下面 数据。
【问题讨论】:
-
看this
-
@JoanColmenero 我已经实现了相同的功能,例如,但它正在通过数据,,
-
你能让我们看看你的屏幕是什么样子吗?
-
@JoanColmenero 我没有足够的声誉来发布图片。
-
放上你图片的链接
标签: android xml android-layout footer