ActionBar hide - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ActionBar hide method.

This code example shows how to use the following methods:hide, setDisplayOptions, setHomeButtonEnabled
This code example shows how to use the following methods:hide
	@SuppressLint("NewApi") 
	public static void ToggleFullscreen(Activity activity, boolean fullscreen) {
		if(fullscreen) {
			if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
				ActionBar actionBar = activity.getActionBar();
				if(actionBar != null) actionBar.hide();
			} 
			else { 
				activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
			} 
			 
			//activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
			//						  WindowManager.LayoutParams.FLAG_FULLSCREEN); 
			activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
			activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
		} 
		else { 
			activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
			activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
	    } 
5
CodeRank
This code example shows how to use the following methods:hide, isShowing
		return super.onCreateOptionsMenu(menu);
	} 
 
	public void onClickCanviaActionBar(View v) {
		ActionBar actionBar = getSupportActionBar();
		if (!actionBar.isShowing()) {
			actionBar.show();
		} else { 
			actionBar.hide();
		} 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:hide
    public void hideActionBar(Activity a) {
        ActionBar ab = a.getActionBar();
        if (ab == null) {
            return; 
        } 
        ab.hide();
    } 
 
    @Override 
    protected void setNotificationVisibility(Request request, boolean notification) {
        request.setNotificationVisibility(notification ? Request.VISIBILITY_VISIBLE : Request.VISIBILITY_HIDDEN);
    } 
} 
4
CodeRank
This code example shows how to use the following methods:hide
actionBar.show();
    } 
    public void hideActionBar(View source)
    { 
    	actionBar.hide();
    } 
 
 
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present. 
        getMenuInflater().inflate(R.menu.main, menu);
        return true; 
    } 
     
} 
4
CodeRank
This code example shows how to use the following methods:hide
		} 
		return true; 
	} 
 
	public void hide() { 
		mActionBar.hide();
	} 
	 
	public boolean isShowing() { 
		return mActionBar.isShowing();
	} 
 
 
	public void setActionCallback(OnOperationListener callBack) {
		mCallBack = callBack;
	} 
} 
4
CodeRank
This code example shows how to use the following methods:hide
	 
	private SlideoutHelper mSlideoutHelper;
	 
	public void closeMenu() 
	{ 
		actionBar.hide();
		mSlideoutHelper.close();
	} 
 
} 
4
CodeRank
This code example shows how to use the following methods:hide
            // using mViewPager since we have it and we need a view 
            mViewPager.setSystemUiVisibility(flags);
        } else { 
            final ActionBar actionBar = getActionBar();
            if (enabled) {
                actionBar.hide();
            } else { 
                actionBar.show();
            } 
            int flags = enabled
                    ? View.SYSTEM_UI_FLAG_LOW_PROFILE
                    : View.SYSTEM_UI_FLAG_VISIBLE;
            mViewPager.setSystemUiVisibility(flags);
        } 
    } 
 
    private Runnable mActionBarHideRunnable = new Runnable() {
        @Override 
        public void run() { 
            PhotoViewActivity.this.setLightsOutMode(true); 
3
CodeRank
This code example shows how to use the following methods:hide
This code example shows how to use the following methods:hide
    mActionBar.show();
    mHandler.postDelayed(this, 10000);
  } 
 
  public void hide() { 
    mActionBar.hide();
    mHandler.removeCallbacks(this);
  } 
 
  public void run() { 
    mActionBar.hide();
  } 
} 
4
CodeRank

Related ActionBar hide Questions & Answers:

hide Method Overview
Hide the ActionBar if it is currently showing.
See Code Examples for other Android ActionBar Methods: