List of usage examples for android.appwidget AppWidgetManager ACTION_APPWIDGET_PICK
String ACTION_APPWIDGET_PICK
To view the source code for android.appwidget AppWidgetManager ACTION_APPWIDGET_PICK.
Click Source Link
From source file:com.launcher.silverfish.HomeScreenFragment.java
private void selectWidget() { // Allocate widget id and start widget selection activity int appWidgetId = this.mAppWidgetHost.allocateAppWidgetId(); Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK); pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); addEmptyData(pickIntent); // This is needed work around some weird bug. startActivityForResult(pickIntent, REQUEST_PICK_APPWIDGET); }
From source file:com.launcher.silverfish.launcher.homescreen.HomeScreenFragment.java
public void popupSelectWidget() { // Allocate widget id and start widget selection activity int appWidgetId = this.mAppWidgetHost.allocateAppWidgetId(); Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK); pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); addEmptyData(pickIntent); // This is needed work around some weird bug. startActivityForResult(pickIntent, REQUEST_PICK_APPWIDGET); }
From source file:de.spiritcroc.modular_remote.MainActivity.java
public void addWidget(Container container) { addWidgetContainer = container;/*from ww w. j a v a 2 s. co m*/ int appWidgetId = appWidgetHost.allocateAppWidgetId(); Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK) .putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); startActivityForResult(pickIntent, MainActivity.REQUEST_PICK_APPWIDGET); }