List of usage examples for android.support.v4.app ActionBar setDisplayShowCustomEnabled
public abstract void setDisplayShowCustomEnabled(boolean showCustom);
Set whether a custom view should be displayed, if set.
To set several display options at once, see the setDisplayOptions methods.
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);/*from w w w . j a va 2 s . c o m*/ // 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 ww w . j ava 2 s . c o m*/ 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.AccountsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.accounts);// ww w .j a v a 2s . c o m // 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.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.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.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 .com*/ // 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:com.todoroo.astrid.actfm.TagSettingsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { setupForDialogOrFullscreen();/*from ww w. j a v a2 s . com*/ 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(); }
From source file:com.todoroo.astrid.taskrabbit.TaskRabbitActivity.java
/** Initialize UI components */ private void setUpUIComponents() { if (taskTitle == null) { taskTitle = (EditText) findViewById(R.id.task_title); taskControls = (LinearLayout) findViewById(R.id.task_controls); descriptionControls = (LinearLayout) findViewById(R.id.description_controls); taskButton = (Button) findViewById(R.id.task_button); taskButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { submitTaskRabbit();//from w ww.j a v a2 s . c o m } }); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(false); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.task_rabbit_header_view); View customView = actionBar.getCustomView(); menuNav = customView.findViewById(R.id.menu_nav); menuNavDisclosure = (ImageView) customView.findViewById(R.id.menu_disclosure_arrow); menuTitle = (TextView) customView.findViewById(R.id.task_rabbit_title); menuNav.setOnClickListener(menuClickListener); createMenuPopover(); } setUpControls(); } }