如何才能在屏幕上的文本选择部件是否会改变? [英] How can the on-screen text selection widget be changed?
问题描述
我注意到,不同的Android应用程序有选择文本的不同方法。如果您单击保持在浏览器中,有一个近距离的文字加上左右两边的可以拖动以修改选择。在Gmail应用,大型蓝色圆圈出现的光标,这使得它容易走动下面。
I noticed that different Android applications have different methods of selecting text. If you click-hold in Browser, there is a close up of the text plus the left and right edges can be dragged to modify the selection. In the Gmail app, a large blue circle appears below the cursor which makes it easy to move around.
在一个EditText框中的默认文本选择控件是比较非常原始。怎样才可以改?
The default text selection widget in an EditText box is very primitive by comparison. How can it be changed?
更新:我忘了提,编辑是假的。当编辑是真正的文本选择是好的。
Update: I forgot to mention that editable is false. When editable is true the text selector is fine.
P.S。它是什么在屏幕上的文本选择适当的名称?
p.s. What its the proper name for the on-screen text selector?
推荐答案
作为的Android 3.0(API级别11),您可以设置的android:textIsSelectable
属性上的任何的TextView
来做出选择文本。默认的UI截至记者发稿类似于你的浏览器中引用的行为。
As of Android 3.0 (API level 11), you can set the android:textIsSelectable
attribute on any TextView
to make its text selectable. The default UI as of this writing is similar to the behavior you referenced for the browser.
修改:另外,默认的Android浏览器使用类似于默认的文本选择处理姜饼自己的系统无关的文本选择机制。 蓝圈听起来像一个手机制造商补充说,自定义的界面。
EDIT: Also, the default Android browser uses its own system-independent text selection mechanism that resembles the default text selection handles in Gingerbread. The "blue circle" sounds like a customized interface that a handset manufacturer added.
这篇关于如何才能在屏幕上的文本选择部件是否会改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!