List of usage examples for android.support.v4.app ActionBar setDisplayShowTitleEnabled
public abstract void setDisplayShowTitleEnabled(boolean showTitle);
Set whether an activity title/subtitle should be displayed.
To set several display options at once, see the setDisplayOptions methods.
From source file:com.todoroo.astrid.actfm.TagUpdatesActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { ThemeService.applyTheme(this); super.onCreate(savedInstanceState); setContentView(R.layout.tag_updates_activity); ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.header_title_view); ((TextView) actionBar.getCustomView().findViewById(R.id.title)).setText(R.string.TAd_contextEditTask); }
From source file:org.pixmob.droidlink.ui.AccountsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.accounts);/* w w w .j a v a 2 s.c om*/ // Customize action bar. final ActionBar actionBar = getSupportActionBar(); actionBar.setCustomView(R.layout.nav); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_background)); }
From source file:org.pixmob.fm2.ui.FM2.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.nav); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); setContentView(R.layout.main);// www.ja va 2 s . c om // Setup BugSense framework. BugSenseUtils.setup(this); }
From source file:org.pixmob.fm2.ui.AccountDetails.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.nav); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); final Account account = (Account) getIntent().getSerializableExtra(EXTRA_ACCOUNT); if (account == null) { throw new IllegalStateException("Missing account"); }/*from w w w . j a v a2 s .c om*/ if (savedInstanceState == null) { final FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); final AccountDetailsFragment f = AccountDetailsFragment.newInstance(account); ft.add(android.R.id.content, f); ft.commit(); } }
From source file:org.pixmob.droidlink.ui.EventDetailsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.event_details); // Customize action bar. final ActionBar actionBar = getSupportActionBar(); actionBar.setCustomView(R.layout.nav); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_background)); notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); }
From source file:com.abcvoipsip.ui.prefs.Codecs.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.codecs_pager); final ActionBar ab = getSupportActionBar(); ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); ab.setDisplayShowHomeEnabled(true);/*w w w . ja v a 2s. c o m*/ ab.setDisplayShowTitleEnabled(true); mViewPager = (ViewPager) findViewById(R.id.pager); TabsAdapter tabAdapter = new TabsAdapter(this, ab, mViewPager); Tab audioNb = ab.newTab().setText(R.string.narrow_band).setIcon(R.drawable.ic_prefs_media); Tab audioWb = ab.newTab().setText(R.string.wide_band).setIcon(R.drawable.ic_prefs_media); Tab videoNb = ab.newTab().setText(R.string.narrow_band).setIcon(R.drawable.ic_prefs_media_video); Tab videoWb = ab.newTab().setText(R.string.wide_band).setIcon(R.drawable.ic_prefs_media_video); tabAdapter.addTab(audioWb, CodecsFragment.class); tabAdapter.addTab(audioNb, CodecsFragment.class); tabAdapter.addTab(videoWb, CodecsFragment.class); tabAdapter.addTab(videoNb, CodecsFragment.class); }
From source file:com.khalid.crawler.activities.ImageDetailActivity.java
@TargetApi(11) @Override/*from ww w. j av a 2 s . c o m*/ public void onCreate(Bundle savedInstanceState) { if (BuildConfig.DEBUG) { Utils.enableStrictMode(); } super.onCreate(savedInstanceState); setContentView(R.layout.image_detail_pager); // Fetch screen height and width, to use as our max size when loading images as this // activity runs full screen final DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); final int height = displayMetrics.heightPixels; final int width = displayMetrics.widthPixels; // For this sample we'll use half of the longest width to resize our images. As the // image scaling ensures the image is larger than this, we should be left with a // resolution that is appropriate for both portrait and landscape. For best image quality // we shouldn't divide by 2, but this will use more memory and require a larger memory // cache. final int longest = (height > width ? height : width) / 2; ImageCache.ImageCacheParams cacheParams = new ImageCache.ImageCacheParams(this, IMAGE_CACHE_DIR); cacheParams.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of app memory // The ImageFetcher takes care of loading images into our ImageView children asynchronously mImageFetcher = new ImageFetcher(this, longest); mImageFetcher.addImageCache(getSupportFragmentManager(), cacheParams); mImageFetcher.setImageFadeIn(false); // Set up ViewPager and backing adapter // TODO: commented // mAdapter = new ImagePagerAdapter(getSupportFragmentManager(), Images.imageUrls.length); mPager = (ViewPager) findViewById(R.id.pager); mPager.setAdapter(mAdapter); mPager.setPageMargin((int) getResources().getDimension(R.dimen.image_detail_pager_margin)); mPager.setOffscreenPageLimit(2); // Set up activity to go full screen getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN); // Enable some additional newer visibility and ActionBar features to create a more // immersive photo viewing experience if (Utility.hasHoneycomb()) { final ActionBar actionBar = getActionBar(); // Hide title text and set home as up actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayHomeAsUpEnabled(true); // Hide and show the ActionBar as the visibility changes mPager.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { @Override public void onSystemUiVisibilityChange(int vis) { if ((vis & View.SYSTEM_UI_FLAG_LOW_PROFILE) != 0) { actionBar.hide(); } else { actionBar.show(); } } }); // Start low profile mode and hide ActionBar mPager.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); actionBar.hide(); } // Set the current item based on the extra passed in to this activity final int extraCurrentItem = getIntent().getIntExtra(EXTRA_IMAGE, -1); if (extraCurrentItem != -1) { mPager.setCurrentItem(extraCurrentItem); } }
From source file:org.pixmob.droidlink.ui.EventsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(android.view.Window.FEATURE_PROGRESS); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); setContentView(R.layout.events);//ww w .j a v a 2s .c o m // A spinner is displayed when events are synchronizing. setProgressBarIndeterminateVisibility(Boolean.FALSE); setProgressBarVisibility(false); // Customize action bar. final ActionBar actionBar = getSupportActionBar(); actionBar.setCustomView(R.layout.nav); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_background)); syncActionReceiver = new SyncActionReceiver(); prefsEditor = getSharedPreferences(SHARED_PREFERENCES_FILE, MODE_PRIVATE).edit(); notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); // The details fragment is hidden until an event is selected. final Fragment details = getSupportFragmentManager().findFragmentById(R.id.event_details); if (details != null) { final FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.hide(details); ft.commit(); } }
From source file:mobisocial.bento.ebento.ui.EventActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_event); mbLaunchedFromList = getIntent().hasExtra(EXTRA_LAUNCHED_FROM_LIST); if (!mbLaunchedFromList) { // create Musubi Instance InitialHelper initHelper = new InitialHelper(this, mInitCompleteListener); Musubi musubi = initHelper.initMusubiInstance(false); if (musubi == null) { return; }/*from ww w . ja va 2 s .c o m*/ } final ActionBar actionBar = getSupportActionBar(); // set defaults for logo & home up actionBar.setDisplayHomeAsUpEnabled(true); // bad know-how for enabling home clickable on ICS. actionBar.setDisplayHomeAsUpEnabled(mbLaunchedFromList); actionBar.setDisplayUseLogoEnabled(false); actionBar.setDisplayShowTitleEnabled(false); FragmentManager fm = getSupportFragmentManager(); mEventFragment = (EventFragment) fm.findFragmentById(R.id.fragment_event); mRsvpFragment = (RsvpFragment) fm.findFragmentById(R.id.fragment_rsvp); mPeopleListFragment = (PeopleListFragment) fm.findFragmentById(R.id.fragment_people_list); mManager.addListener(mStateUpdatedListener); }
From source file:com.todoroo.astrid.actfm.TagSettingsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { setupForDialogOrFullscreen();/*from ww w . ja v a 2s . co m*/ super.onCreate(savedInstanceState); setContentView(R.layout.tag_settings_activity); tagData = getIntent().getParcelableExtra(TagViewFragment.EXTRA_TAG_DATA); if (tagData == null) { isNewTag = true; tagData = new TagData(); } ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.header_title_view); } setUpSettingsPage(); if (savedInstanceState != null && savedInstanceState.containsKey(MEMBERS_IN_PROGRESS)) { final String members = savedInstanceState.getString(MEMBERS_IN_PROGRESS); new Thread(new Runnable() { @Override public void run() { AndroidUtilities.sleepDeep(500); runOnUiThread(new Runnable() { @Override public void run() { updateMembers(members); } }); } }).start(); } showCollaboratorsPopover(); }