@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_content_highlight); if (getSupportActionBar() != null) { getSupportActionBar().hide(); } publication = (Publication) getIntent().getSerializableExtra(Constants.PUBLICATION); mConfig = AppUtil.getSavedConfig(this); mIsNightMode = mConfig != null && mConfig.isNightMode(); initViews(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setExitOnBackPressed(true); setContentView(activityLayout()); mainView = findViewById(R.id.chat_sdk_root_view); setupTouchUIToDismissKeyboard(mainView); initViews(); getSupportActionBar().hide(); // PermissionRequestHandler.shared().requestReadExternalStorage(this).subscribe(new CrashReportingCompletableObserver()); updateExtras(getIntent().getExtras()); }
protected void hide() { // Hide UI first ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.hide(); } mControlsView.setVisibility(View.GONE); mVisible = false; // Schedule a runnable to remove the status and navigation bar after a delay mHideHandler.removeCallbacks(mShowPart2Runnable); mHideHandler.postDelayed(mHidePart2Runnable, uiAnimationDelay); }
/** * setContentView 之后用 */ public void setNoTitle_AppCompatActivity() { //设置无标题 try { ((AppCompatActivity) activity).getSupportActionBar().hide(); } catch (Exception e) { e.printStackTrace(); } }
private void hideSystemUi() { if (getSupportActionBar() != null) { getSupportActionBar().hide(); } fullscreenContent.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); }
public void hideActionBar(boolean hide) { ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { if (hide) { actionBar.hide(); } else { actionBar.show(); } } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); getSupportActionBar().hide(); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); getWindow().setStatusBarColor(Color.TRANSPARENT); } AppData.processApps(this); } }
private void updateControllersVisibility(boolean show) { if (show) { getSupportActionBar().show(); mControllers.setVisibility(View.VISIBLE); } else { if (!Utils.isOrientationPortrait(this)) { getSupportActionBar().hide(); } mControllers.setVisibility(View.INVISIBLE); } }
public void setToolbarVisible(boolean visible) { int marginSize; if (visible) { TypedValue typedValue = new TypedValue(); getTheme().resolveAttribute(android.R.attr.actionBarSize, typedValue, true); int[] attribute = new int[]{android.R.attr.actionBarSize}; TypedArray array = obtainStyledAttributes(typedValue.resourceId, attribute); marginSize = array.getDimensionPixelSize(0, -1); array.recycle(); // Adjust the margin by a couple of dp, the top pane has that strip of transparent pixels marginSize -= TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 2, getResources().getDisplayMetrics()); topPane.setVisibility(View.VISIBLE); getSupportActionBar().show(); } else { marginSize = 0; topPane.setVisibility(View.GONE); getSupportActionBar().hide(); } ((FrameLayout.LayoutParams) fragmentContainer.getLayoutParams()).topMargin = marginSize; }
@Override public void onStop() { super.onStop(); getPreferenceManager().getSharedPreferences() .unregisterOnSharedPreferenceChangeListener(this); ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if (actionBar != null) { actionBar.hide(); } }
getSupportActionBar().hide();
setContentView(R.layout.activity_main); getSupportActionBar().hide();
setContentView(R.layout.activity_manual_dc_scanner); getSupportActionBar().hide();
getSupportActionBar().hide();
protected void onCreateActivity() { getSupportActionBar().hide(); recordBtn = findViewById(R.id.btn_record); recordBtn.setOnClickListener(v -> {
setContentView(R.layout.activity_dc_scanner); getSupportActionBar().hide();
getSupportActionBar().hide();
public static void toggleActionBar(AppCompatActivity actionBarActivity, ViewPager viewPager) { try { if (actionBarActivity == null || actionBarActivity.getSupportActionBar() == null) return; FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) viewPager .getLayoutParams(); if (lp == null) return; if (actionBarActivity.getSupportActionBar().isShowing()) { actionBarActivity.getSupportActionBar().hide(); lp.topMargin = 0; viewPager.setLayoutParams(lp); } else { actionBarActivity.getSupportActionBar().show(); lp.topMargin = getActionBarHeightCompat(actionBarActivity); viewPager.setLayoutParams(lp); } } catch (Throwable t) { Log.e("DilbertFragmentActivity", "Toggle ActionBar failed", t); } }
setContentView(R.layout.activity_payform_scanner); getSupportActionBar().hide();
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().hide(); SliderPage first = new SliderPage(); first.setTitle(getString(R.string.title_intro)); first.setDescription(getString(R.string.description__intro)); first.setImageDrawable(R.mipmap.ic_launcher); first.setBgColor(bg); addSlide(AppIntroFragment.newInstance(first)); SliderPage second = new SliderPage(); second.setTitle(getString(R.string.title_open)); second.setDescription(getString(R.string.description_open)); second.setImageDrawable(R.drawable.opensource_wide); second.setBgColor(bg); addSlide(AppIntroFragment.newInstance(second)); SliderPage third = new SliderPage(); third.setTitle(getString(R.string.title_permission)); third.setDescription(getString(R.string.description__permission)); third.setImageDrawable(R.drawable.patterns_permissions); third.setBgColor(bg); addSlide(AppIntroFragment.newInstance(third)); showSkipButton(false); askForPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 3); showStatusBar(false); setNavBarColor("#2481a1"); }