Android的,我怎么停止指针下方出现一个EditText [英] Android, how do I stop a pointer appearing below an EditText

查看:300
本文介绍了Android的,我怎么停止指针下方出现一个EditText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有它的一些EditTexts的活动。当我点击一个EditText更改文本中有一个蓝色的箭头出现以下光标出现在哪里。我怎样才能制止这种出现?

I have an activity with some EditTexts in it. When I click on an EditText to change the text in it a blue arrow appears below where the cursor appears. How can I stop this appearing?

推荐答案

由于MarvinLabs指出,这是一组在Android SDK中可绘制的。他们虽然可以覆盖。

As MarvinLabs pointed out, it's a set of drawables in the Android SDK. They can be overridden though.

  1. 查找你的SDK平台这些图片:

  1. Find these images in your sdk platform:

  • text_select_handle_left.png
  • text_select_handle_middle.png
  • text_select_handle_right.png

将其复制到您的可绘文件夹,让您拥有一个本地副本引用。你可以改变这些颜色,让他们空,或者任何你想要的。请注意,这是MarvinLabs说,它可能不会是明智的,完全删除它们,因为它们可以帮助用户选择文本的剪切和复制。

Copy them over to your drawables folder, so you have a local copy to reference. You can change the colors of these, make them empty, or whatever you want. Note that this as MarvinLabs said, it might not be wise to remove them completely because they help the user select text for cutting and copying.

如果您还没有定义在styles.xml自定义主题,定义一个。那么这些项目添加到它:

If you don't have a custom theme yet defined in your styles.xml, define one. Then add these items to it:

_

<style name="CustomTheme" parent="@android:style/Theme.Holo.Light">
  <item name="android:textSelectHandleLeft">@drawable/text_select_handle_left</item>
  <item name="android:textSelectHandleRight">@drawable/text_select_handle_right</item>
  <item name="android:textSelectHandle">@drawable/text_select_handle_middle</item>
</style>

BEFORE:

之后:

(不同EditTexts,但你的想法)

(different EditTexts but you get the idea)

这篇关于Android的,我怎么停止指针下方出现一个EditText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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