Java Code Examples for android.support.v7.app.ActionBar.setShowHideAnimationEnabled()

The following are Jave code examples for showing how to use setShowHideAnimationEnabled() of the android.support.v7.app.ActionBar class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GiraffePlayer2   File: UIHelper.java   View Source Code Vote up 6 votes
public UIHelper showActionBar(boolean show) {
    if (activity == null) {
        return this;
    }
    if (activity instanceof AppCompatActivity) {
        ActionBar supportActionBar = ((AppCompatActivity) activity).getSupportActionBar();
        if (supportActionBar != null) {
            try {
                supportActionBar.setShowHideAnimationEnabled(false);
            } catch (Exception e) {

            }
            if (show) {
                supportActionBar.show();
            } else {
                supportActionBar.hide();
            }
        }
    }
    return this;
}
 
Example 2
Project: MyFire   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void hideSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 3
Project: MyFire   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void showSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 4
Project: Discover   File: JZVideoPlayer.java   View Source Code Vote up 5 votes
@SuppressLint("RestrictedApi")
public static void showSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST && JZUtils.getAppCompActivity(context) != null) {
        ActionBar ab = JZUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
    if (TOOL_BAR_EXIST) {
        JZUtils.getWindow(context).clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 5
Project: Discover   File: JZVideoPlayer.java   View Source Code Vote up 5 votes
@SuppressLint("RestrictedApi")
public static void hideSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST && JZUtils.getAppCompActivity(context) != null) {
        ActionBar ab = JZUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    if (TOOL_BAR_EXIST) {
        JZUtils.getWindow(context).setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 6
Project: Edu   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void hideSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 7
Project: Edu   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void showSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 8
Project: dkplayer   File: WindowUtil.java   View Source Code Vote up 5 votes
/**
 * 隐藏ActionBar,StatusBar,NavigationBar
 */
@SuppressLint("RestrictedApi")
public static void hideSystemBar(Context context) {
    AppCompatActivity appCompatActivity = getAppCompActivity(context);
    if (appCompatActivity != null) {
        ActionBar ab = appCompatActivity.getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    scanForActivity(context).getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    hideNavigationBar(context);
}
 
Example 9
Project: dkplayer   File: WindowUtil.java   View Source Code Vote up 5 votes
/**
 * 显示ActionBar,StatusBar,NavigationBar
 */
@SuppressLint("RestrictedApi")
public static void showSystemBar(final Context context) {
    scanForActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    showNavigationBar(context);
    AppCompatActivity appCompatActivity = getAppCompActivity(context);
    if (appCompatActivity != null) {
        ActionBar ab = appCompatActivity.getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
}
 
Example 10
Project: PicShow-zhaipin   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void hideSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 11
Project: PicShow-zhaipin   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void showSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 12
Project: HeadlineNews   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void showSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.show();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}
 
Example 13
Project: HeadlineNews   File: JCVideoPlayer.java   View Source Code Vote up 5 votes
public static void hideSupportActionBar(Context context) {
    if (ACTION_BAR_EXIST) {
        ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
        if (ab != null) {
            ab.setShowHideAnimationEnabled(false);
            ab.hide();
        }
    }
    if (TOOL_BAR_EXIST) {
        JCUtils.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}