为的EditText第一个字母大写第一个、字母、EditText

2023-09-12 23:54:23 作者:我爸今天抚摸我的头说:我相信你总有人头落地的一天。下面小编为

我正在一点点个人的待办事项列表应用程序,到目前为止,一切都已经合作得非常好。有一个小怪癖,我想弄清楚。每当我去添加新项目,我有一个对话框,显示里面一个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.

http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType