底部标签的列表视图重叠 [英] Tabs at bottom overlapping with the list view

查看:213
本文介绍了底部标签的列表视图重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background"
    android:orientation="vertical" >

    <include
        android:id="@+id/include1"
        android:layout_width="fill_parent"
        android:layout_height="70dp"
        layout="@layout/header_history" >
    </include>

    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:cacheColorHint="#00000000"
        android:divider="@android:color/black"
        android:dividerHeight="1.0sp"
        android:textColor="#000000" />


</LinearLayout>

header_history.xml

header_history.xml

<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/button" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@drawable/button"
        android:gravity="left|center_vertical"
        android:text="   History"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="@android:color/white"
        android:textSize="24sp"
        android:textStyle="bold" />

</RelativeLayout>

Tabs.xml

Tabs.xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="5dp" />

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:color="#000000"
            android:gravity="bottom" />
    </RelativeLayout>

</TabHost>

我动态添加的列表视图中的数据并显示它。我有一个在底部的标签栏所以最后一个记录是重叠listview.Please的最后一个记录帮我妥善解决。
谢谢

I am adding the data dynamically on the listview and displaying it. I have a tab bar at the bottom so the last record is overlapping the last record of the listview.Please help me with proper solution. Thanks

推荐答案

更​​新的FrameLayout 里面的 TabHost 如下

<FrameLayout
  android:id="@android:id/tabcontent"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:padding="5dp"

  android:layout_above="@android:id/tabs" />

这篇关于底部标签的列表视图重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆