为的EditText第一个字母大写 [英] First letter capitalization for EditText

查看:154
本文介绍了为的EditText第一个字母大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一点点个人的待办事项列表应用程序,到目前为止,一切都已经合作得非常好。有一个小怪癖,我想弄清楚。每当我去添加新项目,我有一个对话框,显示里面一个EditText视图。当我选择的EditText视图,键盘出现输入文本,因为它应该。在大多数应用中,默认的似乎是shift键举行的第一个字母...虽然它不为我的观点做到这一点。必须有解决一个简单的方法,但我已经重复搜索的参考,并不能找到它。我想必须有由适配器加载参考XML属性,但我无法找出它是什么。

I'm working on a little personal todo list app and so far everything has been working quite well. There is one little quirk I'd like to figure out. Whenever I go to add a new item, I have a Dialog with an EditText view showing inside. When I select the EditText view, the keyboard comes up to enter text, as it should. In most applications, the default seems to be that the shift key is held for the first letter... although it does not do this for my view. There has to be a simple way to fix, but I've searched the reference repeatedly and cannot find it. I'm thinking there has to be an xml attribute for the reference loaded by the Adapter, but I can't find out what it is.

推荐答案

设置机器人:inputType =textCapSentences您的EditText

Set android:inputType="textCapSentences" on your EditText.

<一个href="http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType">http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

这篇关于为的EditText第一个字母大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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