use of rocks.tbog.tblauncher.ui.LinearAdapterPlus in project TBLauncher by TBog.
the class WidgetManager method getWidgetListPopup.
/**
* A popup with all active widgets to choose one
*
* @return the menu
*/
public ListPopup getWidgetListPopup(@StringRes int title) {
Context ctx = mLayout.getContext();
LinearAdapter adapter = new LinearAdapterPlus();
adapter.add(new LinearAdapter.ItemTitle(ctx, title));
for (WidgetRecord rec : mWidgets.values()) {
adapter.add(WidgetPopupItem.create(ctx, mAppWidgetManager, rec.appWidgetId));
}
for (PlaceholderWidgetRecord placeholder : mPlaceholders) {
adapter.add(PlaceholderPopupItem.create(ctx, placeholder));
}
return ListPopup.create(ctx, adapter);
}
Aggregations