Ely*_*lye 6 android android-edittext
如果你有EditText,点击它将显示一个气泡光标.我在下面显示一张图片(以Twitter应用程序为例)......
我的问题是:
EditText?(或来自我们的整个活动/片段/应用程序)它叫做文本选择句柄.
隐藏它有一种棘手的方法:用style.xml中的0px透明drawable替换.
绘制/ zero_px_transparent.xml
<?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>
Run Code Online (Sandbox Code Playgroud)
并修改你的style.xml:
<style name="CustomTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:textSelectHandleLeft">@drawable/zero_px_transparent</item>
<item name="android:textSelectHandleRight">@drawable/zero_px_transparent</item>
<item name="android:textSelectHandle">@drawable/zero_px_transparent</item>
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1773 次 |
| 最近记录: |