Code example for AppWidgetHost

Methods: startListening

0
 
/** 
 * Re-listen when widgets are reset. 
 */ 
private void onAppWidgetReset() { 
    mAppWidgetHost.startListening();
} 
 
private void undoLastWidget() { 
	widgCount--;//the incremented value was waiting for next add, peel it back to remove last
	 
	Log.v("delete request", "trying to remove " + widgCount);
		 
	 
	RelativeLayout parent= (RelativeLayout) findViewById(R.id.widgets);
	 
	//deduct its width from the count 
	int w = mAppWidgetManager.getAppWidgetInfo(widgetId[widgCount]).minWidth;
	 
	if (mRowWidth == w && currentRow != 0) {