這張圖片左邊部分和右邊部分還是有很大的不同,不是指內容上,是指布局上,左邊的是我今天寫這次代碼之前的布局,root是用的RelativeLayout,右邊是用的FrameLayout,體現在介面上就是右邊的list內容可以頂到最上面,而左邊的list是在上面的topBar下面。
看布局代碼:布局代碼還用到了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>
繼續往下拉,ok,見底了,看到更多的提示了嘛,點擊它
<ignore_js_op>
出現進度條提示
<ignore_js_op>
載入完畢之後顯示新的一頁,繼續往下拉,又會看見更多提示,然後如此迴圈。主要是利用了隱藏。
<ignore_js_op>
如何透明的覆蓋在上面,目前看上去是使用include布局,回去試試先。