5

I was trying to include an editText in appwidget..later I came to know that it is not possible to include edittext

But if I check Google search appwiget I can see they are using a view similar to edittext.. How can I create a view like edittext for widget

Eby
  • 2,769
  • 4
  • 23
  • 30

2 Answers2

4

Dianne Hackborn explains on this thread:

http://groups.google.com/group/android-developers/browse_thread/thread/a50a2aff0c8c754d/

that the Google search widget is a "special case", built right into the home screen (not a true widget), so they are obviously able to take some liberties. Pretty sure you're not going to be able to do this, at least not pre-3.0.

soupdog
  • 335
  • 2
  • 9
  • Twitter and Facebook have the EditText like view on their widgets .. Actually they are using TextView for that – Eby May 06 '11 at 07:44
  • does EditText for widget still cannot be implemented in lollipop and marshmallow? – natsumiyu Jun 08 '16 at 03:45
2

I have used TextView instead of EditText with custom background.. and onClick it will take to the desired screen ..
This looks similar to Twitter and Facebook search widget :)

Eby
  • 2,769
  • 4
  • 23
  • 30
  • 1
    I will be able to open a soft keyboard when clicking on the text view, but how can I capture the keyboard inputs and change the text view text accordingly ? – user1510006 Mar 26 '15 at 07:57