List of usage examples for android.support.v4.app ActionBar DISPLAY_USE_LOGO
int DISPLAY_USE_LOGO
To view the source code for android.support.v4.app ActionBar DISPLAY_USE_LOGO.
Click Source Link
From source file:net.coscolla.guiaTv.ui.BaseActivity.java
@Override protected void onCreate(Bundle saveInstance) { super.onCreate(saveInstance); if (UIUtils.isTablet(this)) { this.getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_USE_LOGO, ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_USE_LOGO); } else {//from w w w . j a v a2 s. c o m this.getSupportActionBar().setDisplayOptions(0, ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_USE_LOGO); } }
From source file:com.actionbarsherlock.sample.hcgallery.MainActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null && savedInstanceState.getInt("theme", -1) != -1) { mThemeId = savedInstanceState.getInt("theme"); this.setTheme(mThemeId); }/*www. j av a 2s . c om*/ setContentView(R.layout.main); Directory.initializeDirectory(); ActionBar bar = getSupportActionBar(); int i; for (i = 0; i < Directory.getCategoryCount(); i++) { bar.addTab(bar.newTab().setText(Directory.getCategory(i).getName()).setTabListener(this)); } mActionBarView = getLayoutInflater().inflate(R.layout.action_bar_custom, null); bar.setCustomView(mActionBarView); bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_USE_LOGO); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); bar.setDisplayShowHomeEnabled(true); // If category is not saved to the savedInstanceState, // 0 is returned by default. if (savedInstanceState != null) { int category = savedInstanceState.getInt("category"); bar.selectTab(bar.getTabAt(category)); } }
From source file:org.androidui.app.ActionBarImpl.java
@Override public void setDisplayUseLogoEnabled(boolean useLogo) { setDisplayOptions(useLogo ? ActionBar.DISPLAY_USE_LOGO : 0, ActionBar.DISPLAY_USE_LOGO); }