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)的代碼,我沒有按照他們說的做(以前沒搜到 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程序開發(fā)之ListView實(shí)現(xiàn)橫向滾動(dòng)(帶表頭與固定列)
- android ListView的右邊滾動(dòng)滑塊啟用方法 分享
- android ListView自動(dòng)滾動(dòng)方法
- android開發(fā)之橫向滾動(dòng)/豎向滾動(dòng)的ListView(固定列頭)
- Android通過代碼控制ListView上下滾動(dòng)的方法
相關(guān)文章
Android實(shí)現(xiàn)循環(huán)輪播跑馬燈的效果
這篇文章主要介紹了為大家詳細(xì)介紹了如何通過Android實(shí)現(xiàn)循環(huán)輪播跑馬燈的效果,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-05-05Android實(shí)現(xiàn)有視差效果的ListView
這篇文章給大家詳解介紹了在Android中如何實(shí)現(xiàn)帶有視差效果的ListView,文章給出了示例代碼相信對(duì)大家的理解和學(xué)習(xí)更有幫助,有需要的朋友們下面來(lái)一起看看吧。2016-09-09Android編程實(shí)現(xiàn)多列顯示的下拉列表框Spinner功能示例
這篇文章主要介紹了Android編程實(shí)現(xiàn)多列顯示的下拉列表框Spinner功能,結(jié)合具體實(shí)例形式分析了Android多列表顯示功能的相關(guān)布局操作實(shí)現(xiàn)技巧,需要的朋友可以參考下2017-06-06開箱即用的Google與百度定位坐標(biāo)系轉(zhuǎn)換實(shí)例
這篇文章主要為大家介紹了開箱即用的Google與百度定位坐標(biāo)系轉(zhuǎn)換實(shí)例,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-08-08Android 簡(jiǎn)單實(shí)現(xiàn)倒計(jì)時(shí)功能
在 Android 中倒計(jì)時(shí)功能是比較常用的一個(gè)功能,比如短信驗(yàn)證碼,付款倒計(jì)時(shí)等。今天小編給大家分享Android 簡(jiǎn)單實(shí)現(xiàn)倒計(jì)時(shí)功能,感興趣的朋友一起看看吧2019-12-12Android手機(jī)上同時(shí)安裝正式包與測(cè)試包的方法
這篇文章主要給大家介紹了關(guān)于Android手機(jī)上同時(shí)安裝正式包與測(cè)試包的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-02-02