Android - EditText on status notification

2019-02-10 01:29发布

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

3条回答
【Aperson】
2楼-- · 2019-02-10 01:53

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.

查看更多
Evening l夕情丶
3楼-- · 2019-02-10 02:00

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?

查看更多
对你真心纯属浪费
4楼-- · 2019-02-10 02:02

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"

查看更多
登录 后发表回答