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!
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.
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.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With