android listview 水平滾動(dòng)和垂直滾動(dòng)的小例子
更新時(shí)間:2013年05月29日 10:31:32 作者:
android listview 水平滾動(dòng)和垂直滾動(dòng)的小例子,需要的朋友可以參考一下
網(wǎng)上有很多解決 android listview 水平和垂直滾動(dòng)的代碼,我沒(méi)有按照他們說(shuō)的做(以前沒(méi)搜到 O(∩_∩)O~) 我采用的是添加HorizontalScrollView
Java代碼
< ScrollView android:id="@+id/ScrollView01"
android:layout_height="300px"
android:layout_x="16px"
android:layout_y="84px"
android:layout_width="290px"
android:scrollbars="horizontal|vertical">
< HorizontalScrollView android:id="@+id/HorizontalScrollView01"
android:layout_height="fill_parent"
android:layout_width="wrap_content">
< LinearLayout android:id="@+id/LinearLayout02"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="fill_parent">
< ListView android:id="@+id/listview"
android:layout_height="300px"
android:layout_width="fill_parent">
< /ListView>
< /LinearLayout>
< /HorizontalScrollView>
< /ScrollView>
Java代碼
復(fù)制代碼 代碼如下:
< ScrollView android:id="@+id/ScrollView01"
android:layout_height="300px"
android:layout_x="16px"
android:layout_y="84px"
android:layout_width="290px"
android:scrollbars="horizontal|vertical">
< HorizontalScrollView android:id="@+id/HorizontalScrollView01"
android:layout_height="fill_parent"
android:layout_width="wrap_content">
< LinearLayout android:id="@+id/LinearLayout02"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="fill_parent">
< ListView android:id="@+id/listview"
android:layout_height="300px"
android:layout_width="fill_parent">
< /ListView>
< /LinearLayout>
< /HorizontalScrollView>
< /ScrollView>
您可能感興趣的文章:
- Android ListView隱藏右側(cè)滾動(dòng)條功能
- Android ListView 滾動(dòng)條的設(shè)置詳解及實(shí)例代碼
- Android ListView滾動(dòng)到指定的位置
- Android ListView滾動(dòng)到底后自動(dòng)加載數(shù)據(jù)
- Qt qml中l(wèi)istview 列表視圖控件(下拉刷新、上拉分頁(yè)、滾動(dòng)軸)
- Android程序開(kāi)發(fā)之ListView實(shí)現(xiàn)橫向滾動(dòng)(帶表頭與固定列)
- android ListView的右邊滾動(dòng)滑塊啟用方法 分享
- android ListView自動(dòng)滾動(dòng)方法
- android開(kāi)發(fā)之橫向滾動(dòng)/豎向滾動(dòng)的ListView(固定列頭)
- Android通過(guò)代碼控制ListView上下滾動(dòng)的方法
相關(guān)文章
Android利用ViewPager實(shí)現(xiàn)帶小圓球的圖片滑動(dòng)
這篇文章主要為大家詳細(xì)介紹了Android利用ViewPager實(shí)現(xiàn)帶小圓球的圖片滑動(dòng),并且只有第一次安裝app時(shí)才出現(xiàn)歡迎界面具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-11-11
Android?NDK開(kāi)發(fā)之FFmpeg視頻添加水印
這篇文章主要介紹了在Android?NDK開(kāi)發(fā)中如何通過(guò)FFmpeg為視頻添加水印,文中的示例代碼講解詳細(xì),對(duì)我們了解Android開(kāi)發(fā)有一定的幫助,感興趣的可以學(xué)習(xí)一下2021-12-12
Android intent之間復(fù)雜參數(shù)傳遞方法詳解
這篇文章主要介紹了Android intent之間復(fù)雜參數(shù)傳遞方法,較為詳細(xì)的分析了Android中intent參數(shù)傳遞的常見(jiàn)方法與使用技巧,需要的朋友可以參考下2016-10-10
android開(kāi)發(fā)之關(guān)閉所有的activity的方法
本篇文章主要介紹了android開(kāi)發(fā)之關(guān)閉所有的activity的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-12-12
Android之Viewpager+Fragment實(shí)現(xiàn)懶加載示例
本篇文章主要介紹了Android之Viewpager+Fragment實(shí)現(xiàn)懶加載示例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2017-03-03
Android利用Sensor(傳感器)實(shí)現(xiàn)水平儀功能
這篇文章主要為大家詳細(xì)介紹了Android利用Sensor傳感器實(shí)現(xiàn)水平儀功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-02-02

