Home » Android » android – Is there any way to put an EditText/input field into a homescreen widget?

android – Is there any way to put an EditText/input field into a homescreen widget?

Posted by: admin June 15, 2020 Leave a comment

Questions:

I want my user to input something on the homescreen, but every time I add an Edittext to the widget it breaks. I did a little google searching to find that they apparently are not supported in widgets. There is a Google Search widget with an input field on every android phone though, so I am wondering if there is any way to have one in my widget.

Thanks in advance

EDIT: I noticed that the Google search bar doesn’t actually have an input, instead it just opens an activity on touch. But there are still other apps like FriendStream which have input parts of their widgets.

How to&Answers:

FriendStream can do it because it uses the modified Sense homescreens. It also enables scrolling that is only possible on “stock” Android since 3.0 (Honeycomb) and above.

To resume:

  • Sense: Enables since 1.5 at least (and i think before) input and scroll on any Android version homescreens

  • Android 3.0: Started supporting some of the Sense features, for example scroll on home screen but still not input

So, you can probably add input via edittext on homescrens (or somethink like it) but ONLY on HTC Sense phones.

I don’t think that’s a good ideia though, but that’s already your choice 🙂

Answer:

You cannot use EditText into the Homescreen widget. The Google search widget is merely a drawable (selector drawable – pressed, focused and normal state) which launches an Activity.

Answer:

when tap on homescreen widget start transparent activity with EditText