List of usage examples for android.app ActionBar setDisplayHomeAsUpEnabled
public abstract void setDisplayHomeAsUpEnabled(boolean showHomeAsUp);
From source file:org.lee.android.activity.SearchActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_PROGRESS); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(true); setContentView(R.layout.activity_search); SearchFragment search = new SearchFragment(); Intent intent = getIntent();//from w w w .j av a 2 s. co m search.setArguments(intent.getExtras()); swichFragment(search, false); }
From source file:com.piusvelte.cloudset.android.Actions.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.actions);//from w ww . j a v a 2 s . c o m ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); Intent intent = getIntent(); if (intent != null) { Bundle extras = intent.getExtras(); if ((extras != null) && extras.containsKey(EXTRA_PUBLISHER) && extras.containsKey(EXTRA_SUBSCRIBER)) { publisherId = extras.getLong(EXTRA_PUBLISHER); subscriberId = extras.getLong(EXTRA_SUBSCRIBER); } } }
From source file:net.lacolaco.smileessence.activity.LicenseActivity.java
@Override public void onCreate(Bundle savedInstanceState) { setTheme(Themes.getTheme(((Application) getApplication()).getThemeIndex())); super.onCreate(savedInstanceState); setContentView(R.layout.layout_license); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); setFiles();//w ww . j a v a 2s .c o m }
From source file:com.github.riotopsys.malforandroid2.activity.DetailActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(TAG, "onCreate"); setContentView(R.layout.detail_activity); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(true); if (savedInstanceState == null) { Intent intent = getIntent();/* w w w . jav a 2 s. c om*/ currentDetail = (ChangeDetailViewRequest) intent.getExtras().getSerializable("ITEM"); transitionDetail(false); } }
From source file:com.pureexe.calinoius.environment.camera.activity.FragmentDisplayActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent = getIntent();//from w w w .j a va2s . c o m String type = intent.getType(); String start = intent.getExtras().getString(Intent.EXTRA_TEXT); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setTitle(getFragmentReadableName(start)); if (type.equals("beepActivity")) { if (start.equals("EXIFreadFragment")) { getFragmentManager().beginTransaction().replace(R.id.container, new EXIFreadFragment()).commit(); } else if (start.equals("CompassFragment")) { getFragmentManager().beginTransaction().replace(R.id.container, new CompassFragment()).commit(); } else if (start.equals("SettingPreferenceFragment")) { getFragmentManager().beginTransaction().replace(R.id.container, new SettingPreferenceFragment()) .commit(); } else if (start.equals("HelpFragment")) { getFragmentManager().beginTransaction().replace(R.id.container, new HelpFragment()).commit(); } else { Toast.makeText(getApplicationContext(), "Not Found Intent : " + start, Toast.LENGTH_SHORT).show(); finish(); } } }
From source file:org.deviceconnect.android.deviceplugin.irkit.settings.activity.IRKitAbstractSettingActivity.java
/** * ViewPager????. ????? setContentView//from w w w . ja v a2 s .com * <strong>?????</strong> * * @param savedInstanceState * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.irkit_activity_setting_page); mViewPager = (ViewPager) findViewById(R.id.setting_pager); DConnectFragmentPagerAdapter adapter = new DConnectFragmentPagerAdapter(getSupportFragmentManager(), this); mViewPager.setAdapter(adapter); ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_HOME); actionBar.setTitle(R.string.setting_page_title); } }
From source file:com.lithidsw.wallbox.app.wallsnap.WallSnapActivity.java
private void setupActionBar() { ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); }// www . ja v a 2 s. co m }
From source file:biz.wiz.android.wallet.ui.NetworkMonitorActivity.java
@Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.network_monitor_content); final ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); final ViewPager pager = (ViewPager) findViewById(R.id.network_monitor_pager); final FragmentManager fm = getFragmentManager(); if (pager != null) { final ViewPagerTabs pagerTabs = (ViewPagerTabs) findViewById(R.id.network_monitor_pager_tabs); pagerTabs.addTabLabels(R.string.network_monitor_peer_list_title, R.string.network_monitor_block_list_title); final PagerAdapter pagerAdapter = new PagerAdapter(fm); pager.setAdapter(pagerAdapter);/* ww w. ja v a 2 s.c om*/ pager.setOnPageChangeListener(pagerTabs); pager.setPageMargin(2); pager.setPageMarginDrawable(R.color.bg_less_bright); peerListFragment = new PeerListFragment(); blockListFragment = new BlockListFragment(); } else { peerListFragment = (PeerListFragment) fm.findFragmentById(R.id.peer_list_fragment); blockListFragment = (BlockListFragment) fm.findFragmentById(R.id.block_list_fragment); } }
From source file:de.da_sense.moses.client.DetailActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // check orientation and screen size // only for devices with API Level 11 or higher if (isAtLeastHoneycomb() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && getResources().getConfiguration().isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE)) { Log.d("DetailActivity", "orientation = landscape"); Log.d("DetailActivity", "layout at least size large"); // If the screen is now in landscape mode, we can show the // dialog in-line with the list so we don't need this activity. finish();/*from www .j a v a2 s .com*/ return; } // get the Detail Fragment to check later if it is null or not DetailFragment details = null; Log.d("DetailActivity", "savedInstanceState == null || details == null"); // during initial setup plug in the detail fragment details = new DetailFragment(); details.setRetainInstance(true); details.setArguments(getIntent().getExtras()); getSupportFragmentManager().beginTransaction().add(android.R.id.content, details).commit(); // get ActionBar and set AppIcon to direct to the "home screen" ActionBar ab = getActionBar(); ab.setDisplayHomeAsUpEnabled(true); }
From source file:com.jaspersoft.android.jaspermobile.activities.repository.RepositoryActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); }/*from w w w .j a v a2 s. com*/ if (savedInstanceState == null) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); ResourcesControllerFragment resourcesController = ResourcesControllerFragment_.builder() .emptyMessage(R.string.r_browser_nothing_to_display).recursiveLookup(false) .resourceTypes(filterManager.getFiltersByType(FilterManager.Type.ALL_FOR_REPOSITORY)).build(); transaction.add(R.id.controller, resourcesController, ResourcesControllerFragment.TAG); SearchControllerFragment searchControllerFragment = SearchControllerFragment_.builder() .resourceTypes(filterManager.getFiltersByType(FilterManager.Type.ALL_FOR_REPOSITORY)).build(); transaction.add(searchControllerFragment, SearchControllerFragment.TAG); transaction.commit(); } }