在Android中从EditText禁用/删除文本选择句柄 [英] Disable/Remove Text Select Handle from EditText in Android

查看:215
本文介绍了在Android中从EditText禁用/删除文本选择句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户单击EditText时,光标将带有Text Select Handle. 文本选择手柄可以在字段中移动到其他位置. 文本选择句柄是

When user click on EditText the cursor comes up with the Text Select Handle. Text Select Handle can move around to a different position in the field. Text Select Handle is

有没有一种方法可以删除它,使其不显示?

Is there a way you can remove that so it does not show up?

推荐答案

为解决此问题,我创建了一个形状为空的图像.

To resolve this issue i have created an empty image in shape.

 <?xml version="1.0" encoding="UTF-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle" >

 <size
    android:height="0dp"
    android:width="0dp" />

 </shape>

并仅在编辑文本中使用此图片

and just use this image in edit text

 android:textSelectHandle="@drawable/your_empty_image"

这篇关于在Android中从EditText禁用/删除文本选择句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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