hi Jeff Sharkey : thx for your reply. and can you tell me any other way to add a widget into the Android home. looking forward to hearing from you soon.
daen On Apr 18, 4:17 am, Jeff Sharkey <[email protected]> wrote: > Yes, that's working as intended. There are unsolved issues with how > to get EditText content back across PendingIntent boundaries, so we > aren't allowing EditText in widgets for 1.5. We're looking for a way > to solve this in future releases. > > As a workaround, you could link your widget to launch a Theme.Dialog > activity that contains the EditText. And removing the EditText from > your layout should allow the widget to inflate correctly. > > j > > 2009/4/16 daen <[email protected]>: > > > > > > > > > I downloaded the android 1.5 SDK. > > And I found that we can simply add a widget into the Android > > Homescreen with the java class android.appwidget.AppWidgetProvider. > > > use this layout i can add my own widget successfuly。 > > > <?xml version="1.0" encoding="utf-8"?> > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:orientation="vertical" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > > <TextView > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:text="Hello" > > /> > > </LinearLayout> > > > but when i change the TextView to EditText like this. > > The Android Home can not load my widget. > > > 04-16 09:27:07.111: WARN/AppWidgetHostView(633): Caused by: > > android.view.InflateException: Binary XML file line #13: Class not > > allowed to be inflated android.widget.EditText > > > <?xml version="1.0" encoding="utf-8"?> > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:orientation="vertical" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > > <EditText > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:text="Hello" > > /> > > </LinearLayout> > > > any one can help me? > > -- > Jeff Sharkey > [email protected] Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

