Code example for Fragment

Methods: getActivity, startActivity

0
 
	private class StartButtonOnClickListener implements OnClickListener {
 
		@Override 
		public void onClick(View v) {
			Intent i = new Intent(getActivity(), SampleActivity.class);
			startActivity(i);
		} 
 
	} 
 
}