Code example for RemoteViews

Methods: setOnClickPendingIntent

0
	} 
	 
	private static void setViewAction(Context cont, RemoteViews rv, String action, int idView, String cClass) throws ClassNotFoundException {
		Intent intent = new Intent(cont, Class.forName(cClass));
		intent.setAction(action);		
		rv.setOnClickPendingIntent(idView, PendingIntent.getBroadcast(cont, 0, intent, 0));
	} 
 
	private static int defineLayout(String cClass, int initialLayoutId) {
		int wrapContentlayout = cClass.equals(CLASS_NAME_3X2_WIDGET) ? R.layout.main_3x2_wc : R.layout.main_4x3_wc;
		return ph.autoAdjustableColumns() ? wrapContentlayout : initialLayoutId;
	} 
	 
}