Android listView中填充内容覆盖View组件

这张图片左边部分和右边部分还是有很大的不同,不是指内容上,是指布局上,左边的是我今天写这次代码之前的布局,root是用的RelativeLayout,右边是用的FrameLayout,体现在界面上就是右边的list内容可以顶到最上面,而左边的list是在上面的topBar下面。 

Android listView中填充内容覆盖View组件 _第1张图片

 

看布局代码:布局代码还用到了include,主要是用来重用布局的。include一定要放在最下面啊,因为FrameLayout后面的内容会覆盖掉前面的内容,如果你放在上面,将会看不到标题栏。 

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" 
  android:layout_height
="fill_parent"> <LinearLayout android:orientation="vertical" android:background="#ffffffff" android:layout_width="fill_parent"
        android:layout_height
="fill_parent"> <ListView android:id="@id/android:list" android:paddingTop="45.0dip" android:paddingBottom="50.0dip"
            android:layout_width
="fill_parent" android:cacheColorHint="#00000000" android:fadingEdge="none"
            android:fastScrollEnabled
="false" android:clipToPadding="false" android:layout_height="wrap_content" android:divider="@drawable/list_divider"/> <TextView android:text="" android:textSize="20.0sp" android:textColor="#ff5a5a5a"
               android:gravity
="center_horizontal" android:layout_width="fill_parent"
               android:layout_height="wrap_content" android:paddingTop="15.0dip" android:visibility="invisible"/> </LinearLayout> <include android:id="@+id/home_top" layout="@layout/top_panel" android:layout_width="fill_parent"
      android:layout_height
="wrap_content" /> </FrameLayout>

把微博列表ListView往下拉,此时还未到加载到数据的最底部。 
<ignore_js_op>Android listView中填充内容覆盖View组件 _第2张图片 
继续往下拉,ok,见底了,看到更多的提示了嘛,点击它 
<ignore_js_op>Android listView中填充内容覆盖View组件 _第3张图片 

出现进度条提示 
<ignore_js_op>Android listView中填充内容覆盖View组件 _第4张图片 
加载完毕之后显示新的一页,继续往下拉,又会看见更多提示,然后如此循环。主要是利用了隐藏。 
<ignore_js_op>Android listView中填充内容覆盖View组件 _第5张图片 

 
 
如何透明的覆盖在上面,目前看上去是使用include布局,回去试试先。

你可能感兴趣的:(Android listView中填充内容覆盖View组件 )