TextView的textIsSelectable ="真"在列表视图不工作 [英] textview textIsSelectable="true" not working in Listview

查看:186
本文介绍了TextView的textIsSelectable ="真"在列表视图不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <TextView
                    android:id="@+id/txtSender"
                    style="@android:style/TextAppearance.Small"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:layout_marginTop="10dp"
                    android:background="@drawable/sender_bubble"
                    android:gravity="center_vertical"
                    android:maxEms="11"
                    android:paddingBottom="5dp"
                    android:paddingLeft="5dp"
                    android:paddingRight="15dp"
                    android:paddingTop="5dp"
                    android:text="1234567"
                    android:autoLink="all"
                    android:textColor="@color/color_black"
                    android:textIsSelectable="true"
                    android:visibility="visible" />

这是我在customcell TextView中。当我点击的TextView它不会让我选择的TextView文本。这是完美的工作在我的XPERIA 4.2.2,但是当我在有4.4.4版本的设备上运行相同的code,它不工作。

This is my textview in customcell. When i click on textview it is not allowing me to select the text in textview. It is working perfect in my xperia 4.2.2 but when i run the same code in device having version 4.4.4, it is not working.

请注意:当我设置同样采用Android:textIsSelectable =真属性TextView的这是不是在列表视图,它工作正常4.4.4。列表视图只是移到底部,复位到原来的位置半秒之内。

NOTE : When i set the same android:textIsSelectable="true" property to the Textview which is not in Listview, it works fine in 4.4.4. Listview just move to bottom and resets to its original position within half of a second.

推荐答案

删除textIsSelectable,而是使用:

Remove the textIsSelectable, instead use:

android:inputType="textMultiLine"

该文本将选择和编辑。

The text will be selectable and editable.

这篇关于TextView的textIsSelectable =&QUOT;真&QUOT;在列表视图不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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