ActionBar getHeight - 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 getHeight method.

This code example shows how to use the following methods:getHeight, isShowing
    } 
 
    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
      int topPadding =
          paddingEnabled && actionBar != null && actionBar.isShowing() ? actionBar.getHeight() : 0;
      setPadding(0, topPadding, 0, 0);
 
      super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    } 
 
  } 
 
} 
4
CodeRank
This code example shows how to use the following methods:getHeight
    public void setNavigationMode(int mode) {
        if (mActionBar != null) mActionBar.setNavigationMode(mode);
    } 
 
    public int getHeight() { 
        return mActionBar == null ? 0 : mActionBar.getHeight();
    } 
 
    public boolean setSelectedAction(int type) {
        for (int i = 0, n = sClusterItems.length; i < n; i++) {
            ActionItem item = sClusterItems[i];
            if (item.action == type) {
                mActionBar.setSelectedNavigationItem(i);
                mCurrentIndex = i;
                return true; 
            } 
        } 
        return false; 
    } 
 
5
CodeRank
This code example shows how to use the following methods:getHeight
    public void setNavigationMode(int mode) {
        if (mActionBar != null) mActionBar.setNavigationMode(mode);
    } 
 
    public int getHeight() { 
        return mActionBar == null ? 0 : mActionBar.getHeight();
    } 
 
    public boolean setSelectedAction(int type) {
        for (int i = 0, n = sClusterItems.length; i < n; i++) {
            ActionItem item = sClusterItems[i];
            if (item.action == type) {
                mActionBar.setSelectedNavigationItem(i);
                mCurrentIndex = i;
                return true; 
            } 
        } 
        return false; 
    } 
 
3
CodeRank
This code example shows how to use the following methods:getHeight
        mGLRootView = (GLRootView) findViewById(R.id.gl_root_view);
    } 
 
    public int getActionBarHeight() { 
        ActionBar actionBar = getActionBar();
        return actionBar != null ? actionBar.getHeight() : 0;
    } 
 
    protected void onStorageReady() { 
        if (mAlertDialog != null) {
            mAlertDialog.dismiss();
            mAlertDialog = null;
            unregisterReceiver(mMountReceiver);
        } 
    } 
 
    @Override 
    protected void onStart() { 
        super.onStart(); 
        if (getExternalCacheDir() == null) {
3
CodeRank
This code example shows how to use the following methods:getHeight
        mGLRootView = (GLRootView) findViewById(R.id.gl_root_view);
    } 
 
    public int getActionBarHeight() { 
        ActionBar actionBar = getActionBar();
        return actionBar != null ? actionBar.getHeight() : 0;
    } 
 
    protected void onStorageReady() { 
        if (mAlertDialog != null) {
            mAlertDialog.dismiss();
            mAlertDialog = null;
            unregisterReceiver(mMountReceiver);
        } 
    } 
 
    @Override 
    protected void onStart() { 
        super.onStart(); 
        if (getExternalCacheDir() == null) {
4
CodeRank
This code example shows how to use the following methods:getHeight
        mGLRootView = (GLRootView) findViewById(R.id.gl_root_view);
    } 
 
    public int getActionBarHeight() { 
        ActionBar actionBar = getActionBar();
        return actionBar != null ? actionBar.getHeight() : 0;
    } 
 
    protected void onStorageReady() { 
        if (mAlertDialog != null) {
            mAlertDialog.dismiss();
            mAlertDialog = null;
            unregisterReceiver(mMountReceiver);
        } 
    } 
 
    @Override 
    protected void onStart() { 
        super.onStart(); 
        if (getExternalCacheDir() == null) {
4
CodeRank
This code example shows how to use the following methods:getHeight
		mActionBar = activity.getActionBar();
		mContext = activity.getAndroidContext();
	} 
 
	public int getHeight() { 
		return mActionBar != null ? mActionBar.getHeight() : 0;
	} 
 
	public Menu getMenu() {
		return mActionBarMenu;
	} 
 
	@Override 
	public boolean onNavigationItemSelected(final int itemPosition, final long itemId) {
		return false; 
	} 
 
	public void setDisplayOptions(final boolean displayHomeAsUp, final boolean showTitle) {
		if (mActionBar == null) return;
		int options = 0;
4
CodeRank

Related ActionBar getHeight Questions & Answers:

getHeight Method Overview
Retrieve the current height of the ActionBar.
See Code Examples for other Android ActionBar Methods: