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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---