的EditText列表视图里面不滚动? [英] EditText not scrollable inside the Listview?

查看:170
本文介绍了的EditText列表视图里面不滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的ListView 这也是滚动和里面还有多行的EditText
这是不滚动正确的时候,我想滚动EdiText然后ListView的滚动而工作,我想滚动Editext。
所以请提出了一些很好的方法来处理这​​个问题。

 <的LinearLayout
     机器人:layout_width =match_parent
     机器人:layout_height =WRAP_CONTENT>            <的EditText
                机器人:ID =@ + ID / et_address
                风格=@风格/ Text.Medium
                机器人:layout_width =0dp
                机器人:layout_height =WRAP_CONTENT
                机器人:layout_weight =9
                机器人:重力=顶
                机器人:提示=@字符串/地址
                安卓的inputType =textMultiLine | textCapSentences
                安卓了maxHeight =75dp
                机器人:最大长度=256
                安卓的minlines =2
                机器人:滚动条=垂直
               />
< / LinearLayout中>


解决方案

删除行安卓了maxHeight =75dp,并给的android: layout_height =WRAP_CONTENT的EditText上。它将automaticcaly包裹它的内容,也没有必要进行滚动它,以查看其内容。

I have ListView which is also scrollable and inside it there is MultiLine EditText which is not scrollable properly when I wanted to scroll the EdiText then Listview's scroll works while I wanted to scroll the Editext. so please suggest some good ways to handle this.

 <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content" >

            <EditText
                android:id="@+id/et_address"
                style="@style/Text.Medium"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="9"
                android:gravity="top"
                android:hint="@string/address"
                android:inputType="textMultiLine|textCapSentences"
                android:maxHeight="75dp"
                android:maxLength="256"
                android:minLines="2"
                android:scrollbars="vertical"
               />
</LinearLayout>

解决方案

remove the line android:maxHeight="75dp" and give android:layout_height="wrap_content" for the edittext. It will automaticcaly wrap its content and there is no necessity to scroll it, to view its content.

这篇关于的EditText列表视图里面不滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆