Created
January 5, 2015 10:10
-
-
Save andaag/b980b3ca060c269e7d6a to your computer and use it in GitHub Desktop.
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
final Toolbar toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar); | |
//toolbar.setTitle("This is toolbar title"); | |
toolbar.setTitleTextAppearance(getBaseContext(), R.style.AppTheme_TextStyle); | |
//toolbar.setSubtitle("This is toolbar Subtitle"); | |
toolbar.setSubtitleTextAppearance(getBaseContext(), R.style.AppTheme_TextStyle); | |
toolbar.inflateMenu(R.menu.menu_main); | |
ShareActionProvider bob = (ShareActionProvider) MenuItemCompat.getActionProvider(toolbar.getMenu().findItem(R.id.share_test)); | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_TEXT, "Testing actionbarcompat"); | |
bob.setShareIntent(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment