I'm trying to create a launcher widget with a TextView that is editable. Everything I read says that android:editable is deprecated, so I haven't played with that much (even though it didn't look like that worked anyway).
This is what the xml for the TextView looks like:
<TextView android:id="@+id/hours_textview"
android:text="@string/zero"
android:layout_gravity="center_horizontal|center"
android:layout_marginTop="5dip"
android:padding="10dip"
android:textColor="@android:color/black"
android:layout_width="5开发者_JAVA百科0dip"
android:layout_height="fill_parent"
android:inputType="number"
android:typeface="serif"
android:clickable="true"
android:cursorVisible="true"
android:digits="0123456789"
android:focusable="true"
android:selectAllOnFocus="true"/>
I'm pretty new to android developement so I'm probably missing something obvious. I'm not running any code to process the widget at this point. Do I need to set any event handlers to capture a tap and trigger the editing process? If so ... which events?
Editable text fields are not supported in Launcher app widgets.
精彩评论