Code example for ActionBarActivity

Methods: startActivity

0
    } 
     
    @Override 
    public boolean onOptionsItemSelected(MenuItem item)
    { 
    	startActivity(new Intent(this, HomeActivity.class));
    	return true; 
    } 
	 
	@Override 
    public boolean onNavigationItemSelected(int itemPosition, long itemId) 
    {     
    	switch (itemPosition) 
		{ 
		case ITEM_HOME:
			if (!(this instanceof HomeActivity))
				startActivity(new Intent(this, HomeActivity.class));
			break; 
		case ITEM_WIDTH:
			if (!(this instanceof WidthActivity))
				startActivity(new Intent(this, WidthActivity.class));