Code example for RemoteViews

0
		else return R.layout.main_phone; 
	} 
	 
	public static void beginListen(Context cont)
	{ 
		RemoteViews remote = new RemoteViews( cont.getPackageName(), getLayout(cont) );
		beginListen(cont, remote);
	} 
	 
	public static void beginListen(Context cont, RemoteViews remote)
	{ 
		Intent prefAct = new Intent(cont, PreferencesActivity.class);
		PendingIntent prefActP = PendingIntent.getActivity( cont, 0, prefAct, 0); 
		setListener(cont, prefActP, R.id.date, remote);
		 
		Intent weathAct = new Intent(cont, WeatherActivity.class);
		PendingIntent weathActP = PendingIntent.getActivity( cont, 0, weathAct, 0);
		setListener(cont, weathActP, R.id.forecast, remote);
		 
		Intent faceAct = new Intent(cont, FaceActivity.class);
Connect your IDE to all the code out there  Get Codota for Java