Code example for ActionBarActivity

Methods: onOptionsItemSelected, startActivity

0
	@Override 
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub 
		switch (item.getItemId()) {
		case android.R.id.home:
			startActivity(new Intent(this, MainActivity.class));
			break; 
		} 
		 
		return super.onOptionsItemSelected(item);
	} 
	 
	private class LightingFragmentAdapter extends FragmentPagerAdapter { 
		 
		List<Fragment> listFragments;
		private String[] titles = { "Lighting" };
 
		public LightingFragmentAdapter(FragmentManager fm, List<Fragment> listFragments) {
			super(fm);
			// TODO Auto-generated constructor stub 
			this.listFragments = listFragments;