This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bar.setNavigationOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Toast.makeText(getApplicationContext(),"Home Clicked",Toast.LENGTH_LONG).show(); | |
} | |
}); | |
bar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { | |
@Override | |
public boolean onMenuItemClick(MenuItem item) { | |
switch (item.getItemId()){ | |
case R.id.edit: | |
Toast.makeText(getApplicationContext(),"Edit Clicked",Toast.LENGTH_LONG).show(); | |
break; | |
case R.id.home: | |
Toast.makeText(getApplicationContext(),"Home Clicked",Toast.LENGTH_LONG).show(); | |
break; | |
case R.id.contact: | |
Toast.makeText(getApplicationContext(),"Contact Clicked",Toast.LENGTH_LONG).show(); | |
break; | |
} | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment