日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

android listview 禁止滚动

發(fā)布時(shí)間:2025/4/16 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android listview 禁止滚动 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在一個(gè)項(xiàng)目中,使用了listview和3個(gè)include 布局。

結(jié)果發(fā)現(xiàn)listview為?wrap_content 時(shí),無(wú)法撐開布局。但是所有布局并未占滿屏幕。另外,在include中調(diào)用軟鍵盤時(shí),listview依然不動(dòng),導(dǎo)致編輯內(nèi)容的位置比較別扭。

反復(fù)試驗(yàn),總結(jié)就是為listview設(shè)置高度。但是似乎? ?listview.setOverScrollMode(View.OVER_SCROLL_NEVER);? 不起作用。 布局代碼如下:

(由于?ScrollView 內(nèi)部只能有一個(gè)元素,因此用linearLayout 包括其它元素。)

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"
android:layout_height="match_parent"android:orientation="vertical" ><Toolbar android:id="@+id/stb"android:layout_width="match_parent"
android:layout_height="wrap_content" /><ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"><LinearLayoutandroid:layout_width="match_parent"android:orientation="vertical"android:layout_height="wrap_content"><ListViewandroid:id="@+id/plv"android:layout_width="match_parent"android:layout_height="230dp"tools:ignore="NestedScrolling" /><includeandroid:id="@+id/plable"layout="@layout/style_lable" /><includeandroid:id="@+id/poffset"layout="@layout/price_offset" /><includeandroid:id="@+id/pedit"layout="@layout/style_edit" /></LinearLayout></ScrollView> </LinearLayout>

? ? ??

轉(zhuǎn)載于:https://www.cnblogs.com/htsky/p/11370925.html

總結(jié)

以上是生活随笔為你收集整理的android listview 禁止滚动的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。