Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EditText Alternatives in a Widget? There has to be a way

Has anyone ever successfully implemented an EditText in a widget? I realize Android does not support this, however, "Friend Stream" on HTC devices does it... Is this due to an HTC feature? Could I implement this on HTC? Anyone have any crazy creative ideas for implementing a textbox which actually allows typing on a homescreen widget?

ANY possible leads on this would be much appreciated!

like image 376
Will Avatar asked Dec 14 '10 04:12

Will


People also ask

What is the difference between EditText and TextView?

EditText is used for user input. TextView is used to display text and is not editable by the user. TextView can be updated programatically at any time.

How can I make my spinner look like EditText?

simple_spinner_dropdown_item is used for dropdown item and custom layout custom_spinner_item is used for spinner view to show only TextView . FYI, You can customize this TextView as per your needs.

What is the basic use of EditText control?

XML Attributes of Edittext in AndroidUsed to specify how to align the text like left, right, center, top, etc. Used to set size of the text. Used to set color of the text. Used to set style of the text.


1 Answers

Most of this can be google-ed, expept for the style of TextViews (you can not use EditText in widget..)

But.. go with the style property.. :)

<TextView
    android:id="@+id/etBlahblah"
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:layout_marginTop="4dp"
    android:layout_marginBottom="4dp"
    android:layout_marginLeft="2dp"
    android:layout_marginRight="2dp"
    style="@android:style/Widget.EditText">
</TextView>
like image 200
Stefan Avatar answered Oct 15 '22 13:10

Stefan