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

