Android - EditText on status notification

这一生的挚爱 提交于 2019-11-29 19:39:42

问题


Does anyone know if I can insert an EditText (for inserting text) on an Android notification? I would like to have a button and an edittext when the button is pressed then get back the text on the edittext.

It's possible? Thanks


回答1:


This can be done in Jelly Bean but as far as I know not in version prior to that. Since this is built in to the android system it should be considered and acceptable practice.

From the android blog:

Bi-directional text support: Android 4.1 helps you to reach more users through support for for bi-directional text in TextView and EditText elements.

Android blog post that mentions this capability

Here is were you can learn about "Creating a Custom Notification Layout"




回答2:


But it was good in case where you are using the pdf reader and at the same time you need to use a dictionary then its good to type a word into the textbox and will get its meaning instead of switching from one app to another.




回答3:


Is that good UI? I don't think people expect to write something on a notification. It'll confuse them. Why don't you just have a button that opens your app and lets the user type?



来源:https://stackoverflow.com/questions/12764281/android-edittext-on-status-notification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!