Android listView中填充內容覆蓋View組件

來源:互聯網
上載者:User

這張圖片左邊部分和右邊部分還是有很大的不同,不是指內容上,是指布局上,左邊的是我今天寫這次代碼之前的布局,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布局,回去試試先。
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.