开发者

android: how to add a new line

I have a very simple question.. I am using the following code to edit the title of my option menu.

MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
menu.findItem(R.id.default_email).s开发者_高级运维etTitle("Default E-mail: "+gmailAc);

I just want to add a new line after "Default E-mail".. I have tried \n and \r\n but none of them worked.. Its quite strange that android doesn't support even the simplest of the formatting commands.. Can anyone guide me here.

Thanks all.


Line breaks are not possible in menu.

check this LINK

this is same as what you are trying to do.

hope this helps.


From what I remember, strings in Android can be declared in HTML format. Why don't you try

<br />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜