這是效果
主要是onTouchListener監(jiān)聽事件,監(jiān)視什么時候滑到底部
同時要理解getMeasuredHeight和getHeight的區(qū)別
getMeasuredHeight:全部的長度 包括隱藏的
getHeight:在布局中展示出來的長度
布局文件:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ScrollView android:id="@+id/scrollview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="none" > <TextView android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </ScrollView> <Button android:id="@+id/next" android:layout_gravity="bottom|center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" android:text="點擊加載更多" /> </FrameLayout>
當前標題:Android中使用ScrollView實現(xiàn)滑動到底部顯示加載更多-創(chuàng)新互聯(lián)
文章網址:http://www.chinadenli.net/article44/igjee.html
成都網站建設公司_創(chuàng)新互聯(lián),為您提供網站收錄、營銷型網站建設、搜索引擎優(yōu)化、網站建設、域名注冊、軟件開發(fā)
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)