如何设置多行,firstletter帽子,禁用的EditText建议 [英] How to set multiline,firstletter caps and disable suggestions on edittext

查看:115
本文介绍了如何设置多行,firstletter帽子,禁用的EditText建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对回复电子邮件一个EditText。我想举三个属性的EditText像多行,第一个字符上限和禁用字词建议。
我给了这样的XML ...

I have an edittext for reply to email. i want to give three properties for edittext like Multiline, First character caps and disable word suggestions. I gave like this in xml...

android:inputType="textCapSentences|textVisiblePassword"

我试着在code也... etMessage.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
我不能给多行....我怎么能做到这一点。

I tried in code also... etMessage.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); I am not able to give multiline....how can i achieve this

感谢

推荐答案

我发现这个问题的解决方案。

I found solution for this problem

刚刚成立xml文件中下面的参数。

Just set the following parameters in xml file..

的android:inputType下=textCapSentences | textVisiblePassword
这些是句子的第一个字母设置上限和禁用建议

android:inputType="textCapSentences|textVisiblePassword" These are for setting first letter of sentence to caps and disable suggestions

和下面写在乌尔活动code

and write following code in ur Activity

edittext.setSingleLine(false);

这篇关于如何设置多行,firstletter帽子,禁用的EditText建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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