am d938e216: Merge "Update AppWidgetHostActivity to work again." into honeycomb
* commit 'd938e216cb24f7c154cf62135e90b8e6f3de2464': Update AppWidgetHostActivity to work again.
This commit is contained in:
@@ -46,14 +46,22 @@ public class AppWidgetHostActivity extends Activity
|
||||
AppWidgetContainerView mAppWidgetContainer;
|
||||
|
||||
public AppWidgetHostActivity() {
|
||||
mAppWidgetManager = AppWidgetManager.getInstance(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
mAppWidgetManager = AppWidgetManager.getInstance(this);
|
||||
|
||||
setContentView(R.layout.appwidget_host);
|
||||
|
||||
mHost = new AppWidgetHost(this, HOST_ID) {
|
||||
protected AppWidgetHostView onCreateView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget) {
|
||||
return new MyAppWidgetView(appWidgetId);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
findViewById(R.id.add_appwidget).setOnClickListener(mOnClickListener);
|
||||
mAppWidgetContainer = (AppWidgetContainerView)findViewById(R.id.appwidget_container);
|
||||
|
||||
@@ -188,11 +196,7 @@ public class AppWidgetHostActivity extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
AppWidgetHost mHost = new AppWidgetHost(this, HOST_ID) {
|
||||
protected AppWidgetHostView onCreateView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget) {
|
||||
return new MyAppWidgetView(appWidgetId);
|
||||
}
|
||||
};
|
||||
AppWidgetHost mHost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user