Code examples for ActionBar

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
320:	actionBar.setCustomView(mActionBarLayout); 
321:	actionBar.setDisplayShowCustomEnabled(true); 
322:	actionBar.setDisplayShowTitleEnabled(false); 
-
325:	actionBar.setBackgroundDrawable(getDrawable("action_bar")); 
Full Snippet Info
7
CodeRank
28:	bar.setIcon(getIcon()); 
29:	bar.setDisplayOptions(0, ActionBar.DISPLAY_HOME_AS_UP); 
30:	bar.setDisplayHomeAsUpEnabled(true); 
Full Snippet Info
7
CodeRank
103:	bar.setDisplayHomeAsUpEnabled(true); 
104:	bar.setDisplayShowTitleEnabled(false); 
105:	bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); 
-
109:	bar.setListNavigationCallbacks(adapter, this); 
-
111:	bar.setSelectedNavigationItem(savedInstanceState.getInt(STATE_NAVIGATION_INDEX)); 
Full Snippet Info
7
CodeRank
316:	final int actionBarSelectedNavIndex = mActionBar.getSelectedNavigationIndex(); 
317:	switch(mActionBar.getNavigationMode()) { 
-
320:	mActionBar.setSelectedNavigationItem(mCurrentTab); 
-
326:	mActionBar.setSelectedNavigationItem( 
Full Snippet Info
7
CodeRank
28:	actionBar.setDisplayShowTitleEnabled(true); 
29:	actionBar.setDisplayHomeAsUpEnabled(true); 
Full Snippet Info
7
CodeRank
80:	action_bar.setHomeButtonEnabled(enabled); 
Full Snippet Info
6
CodeRank
133:	mActionBar.setSelectedNavigationItem(position); 
Full Snippet Info
6
CodeRank
31:	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
32:	actionBar.setDisplayShowTitleEnabled(true); 
33:	actionBar.setTitle("I am new here..."); 
34:	actionBar.addTab(actionBar.newTab() 
-
38:	actionBar.addTab(actionBar.newTab() 
-
42:	actionBar.addTab(actionBar.newTab() 
-
74:	actionBar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); 
Full Snippet Info
6
CodeRank
135:	mActionBar.setSelectedNavigationItem(position); 
Full Snippet Info
6
CodeRank
19:	b.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
20:	Tab tab = b.newTab().setText("Library").setTabListener(new TabListener<LibraryActivity>(this, "library", LibraryActivity.class)); 
21:	b.addTab(tab, 0, true); 
-
23:	tab = b.newTab().setText("Queue").setTabListener(new TabListener<QueueActivity>(this, "queue", QueueActivity.class)); 
24:	b.addTab(tab, 1, false); 
-
26:	tab = b.newTab().setText("Now Playing").setTabListener(new TabListener<NowPlayingActivity>(this, "nowplaying", NowPlayingActivity.class)); 
27:	b.addTab(tab, 2, false); 
Full Snippet Info
6
CodeRank
25:	bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
26:	bar.setDisplayShowHomeEnabled(false); 
27:	bar.setDisplayShowTitleEnabled(false); 
-
29:	bar.addTab(bar 
30:	.newTab() 
-
35:	bar.addTab(bar 
36:	.newTab() 
-
43:	bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); 
Full Snippet Info
6
CodeRank
27:	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
28:	actionBar.setDisplayShowTitleEnabled(false); 
29:	actionBar.setDisplayShowHomeEnabled(false); 
-
32:	mTabsAdapter.addTab(actionBar.newTab().setText("home"), HomeFragment.class, null); 
33:	mTabsAdapter.addTab(actionBar.newTab().setText("friends"), FriendsListFragment.class, null); 
34:	mTabsAdapter.addTab(actionBar.newTab().setText("about"), AboutFragment.class, null); 
-
38:	actionBar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); 
Full Snippet Info
6
CodeRank
45:	actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE); 
46:	actionBar.setDisplayShowTitleEnabled(false); 
47:	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
-
49:	if(actionBar.getTabCount() == 0){ 
-
51:	noCompletedTab = actionBar.newTab() 
-
54:	completedTab = actionBar.newTab() 
-
58:	actionBar.addTab(noCompletedTab); 
59:	actionBar.addTab(completedTab); 
Full Snippet Info
6
CodeRank
191:	mActionBar.setSelectedNavigationItem(position); 
Full Snippet Info
6
CodeRank
37:	actionBar.setDisplayShowHomeEnabled(false); 
-
39:	actionBar.setDisplayShowTitleEnabled(false); 
-
41:	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
-
45:	Tab1 = actionBar.newTab().setText("Info"); 
46:	Tab2 = actionBar.newTab().setText("Obsah"); 
47:	Tab3 = actionBar.newTab().setText("Text"); 
-
55:	actionBar.addTab(Tab1); 
56:	actionBar.addTab(Tab2); 
57:	actionBar.addTab(Tab3); 
Full Snippet Info
6
CodeRank
90:	actionBar.setDisplayShowTitleEnabled(false); 
91:	actionBar.setDisplayShowHomeEnabled(true); 
92:	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 
-
95:	.newTab() 
-
98:	actionBar.addTab(tab); 
-
101:	.newTab() 
-
104:	actionBar.addTab(tab); 
-
107:	.newTab() 
-
110:	actionBar.addTab(tab); 
-
113:	.newTab() 
-
116:	actionBar.addTab(tab); 
Full Snippet Info
6
CodeRank