Code example for Context

Methods: getResources

                        Configuration.UI_MODE_TYPE_TELEVISION) ==
    public int getEmbeddedMenuWidthLimit() { 
        return mContext.getResources().getDisplayMetrics().widthPixels / 2;
    public boolean hasEmbeddedTabs() { 
        final int targetSdk = mContext.getApplicationInfo().targetSdkVersion;
        if (targetSdk >= Build.VERSION_CODES.JELLY_BEAN) {
            return mContext.getResources().getBoolean(R.bool.action_bar_embed_tabs);
        // The embedded tabs policy changed in Jellybean; give older apps the old policy 
        // so they get what they expect. 
        return mContext.getResources().getBoolean(R.bool.action_bar_embed_tabs_pre_jb);
    public int getTabContainerHeight() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE