当前位置: 首页>>代码示例>>Java>>正文


Java UIUtils.calculateActionBarSize方法代码示例

本文整理汇总了Java中com.google.samples.apps.iosched.util.UIUtils.calculateActionBarSize方法的典型用法代码示例。如果您正苦于以下问题:Java UIUtils.calculateActionBarSize方法的具体用法?Java UIUtils.calculateActionBarSize怎么用?Java UIUtils.calculateActionBarSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.samples.apps.iosched.util.UIUtils的用法示例。


在下文中一共展示了UIUtils.calculateActionBarSize方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();

    // configure video fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize
            + getResources().getDimensionPixelSize(R.dimen.explore_grid_padding));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:17,代码来源:VideoLibraryFilteredFragment.java

示例2: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    invalidateOptionsMenu();
    if (Config.hasExpertsDirectoryExpired()) {
        startActivity(new Intent(this, BrowseSessionsActivity.class));
        finish();
    }

    Fragment frag = getFragmentManager().findFragmentById(R.id.experts_fragment);
    if (frag != null) {
        // configure expert fragment's top clearance to take our overlaid controls (Action Bar
        // and spinner box) into account.
        int actionBarSize = UIUtils.calculateActionBarSize(this);
        int filterBarSize = getResources().getDimensionPixelSize(R.dimen.filterbar_height);
        mDrawShadowFrameLayout.setShadowTopOffset(actionBarSize + filterBarSize);
        ((ExpertsDirectoryFragment) frag).setContentTopClearance(actionBarSize + filterBarSize
                + getResources().getDimensionPixelSize(R.dimen.explore_grid_padding));
    }
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:21,代码来源:ExpertsDirectoryActivity.java

示例3: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    invalidateOptionsMenu();

    Fragment frag = getFragmentManager().findFragmentById(R.id.videos_fragment);
    if (frag != null) {
        // configure video fragment's top clearance to take our overlaid controls (Action Bar
        // and spinner box) into account.
        int actionBarSize = UIUtils.calculateActionBarSize(this);
        int filterBarSize = getResources().getDimensionPixelSize(R.dimen.filterbar_height);
        mDrawShadowFrameLayout.setShadowTopOffset(actionBarSize + filterBarSize);
        ((VideoLibraryFragment) frag).setContentTopClearance(actionBarSize + filterBarSize
                + getResources().getDimensionPixelSize(R.dimen.explore_grid_padding));
    }
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:17,代码来源:VideoLibraryActivity.java

示例4: onConfigurationChanged

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    boolean landscape = (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE);

    LinearLayout spacerView = (LinearLayout) findViewById(R.id.map_detail_spacer);
    spacerView.setOrientation(landscape ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL);
    spacerView.setGravity(landscape ? Gravity.END : Gravity.BOTTOM);

    View popupView = findViewById(R.id.map_detail_popup);
    LinearLayout.LayoutParams popupLayoutParams = (LinearLayout.LayoutParams)
            popupView.getLayoutParams();

    popupLayoutParams.width = landscape ? 0 : ViewGroup.LayoutParams.MATCH_PARENT;
    popupLayoutParams.height = landscape ? ViewGroup.LayoutParams.MATCH_PARENT : 0;
    popupLayoutParams.topMargin =
            getResources().getDimensionPixelSize(R.dimen.multipane_half_padding) +
                    (landscape ? UIUtils.calculateActionBarSize(this) : 0);
    popupView.setLayoutParams(popupLayoutParams);

    popupView.requestLayout();

    updateMapPadding();
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:25,代码来源:MapMultiPaneActivity.java

示例5: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();

    // configure fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize
            + getResources().getDimensionPixelSize(R.dimen.explore_grid_padding));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:DebugFragment.java

示例6: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    int actionBarSize = UIUtils.calculateActionBarSize(this);
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:12,代码来源:AboutActivity.java

示例7: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();
    // configure session fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize
            + getResources().getDimensionPixelSize(R.dimen.explore_grid_padding));
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:ExploreSessionsFragment.java

示例8: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();

    // configure fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:ExploreIOFragment.java

示例9: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();

    // Configure the fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:SocialFragment.java

示例10: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();

    // configure the fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:15,代码来源:SettingsActivity.java

示例11: onResume

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    getActivity().invalidateOptionsMenu();

    // configure video fragment's top clearance to take our overlaid controls (Action Bar
    // and spinner box) into account.
    int actionBarSize = UIUtils.calculateActionBarSize(getActivity());
    DrawShadowFrameLayout drawShadowFrameLayout =
            (DrawShadowFrameLayout) getActivity().findViewById(R.id.main_content);
    if (drawShadowFrameLayout != null) {
        drawShadowFrameLayout.setShadowTopOffset(actionBarSize);
    }
    setContentTopClearance(actionBarSize);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:VideoLibraryFragment.java

示例12: updateFragContentTopClearance

import com.google.samples.apps.iosched.util.UIUtils; //导入方法依赖的package包/类
private void updateFragContentTopClearance() {
    SessionsFragment frag = (SessionsFragment) getFragmentManager().findFragmentById(
            R.id.sessions_fragment);
    if (frag == null) {
        return;
    }

    View filtersBox = findViewById(R.id.filters_box);

    final boolean filterBoxVisible = filtersBox != null
            && filtersBox.getVisibility() == View.VISIBLE;
    final boolean butterBarVisible = mButterBar != null
            && mButterBar.getVisibility() == View.VISIBLE;

    int actionBarClearance = UIUtils.calculateActionBarSize(this);
    int butterBarClearance = butterBarVisible
            ? getResources().getDimensionPixelSize(R.dimen.butter_bar_height) : 0;
    int filterBoxClearance = filterBoxVisible
            ? getResources().getDimensionPixelSize(R.dimen.filterbar_height) : 0;
    int secondaryClearance = butterBarClearance > filterBoxClearance ? butterBarClearance :
            filterBoxClearance;
    int gridPadding = getResources().getDimensionPixelSize(R.dimen.explore_grid_padding);

    setProgressBarTopWhenActionBarShown(actionBarClearance + secondaryClearance);
    mDrawShadowFrameLayout.setShadowTopOffset(actionBarClearance + secondaryClearance);
    frag.setContentTopClearance(actionBarClearance + secondaryClearance + gridPadding);
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:28,代码来源:BrowseSessionsActivity.java


注:本文中的com.google.samples.apps.iosched.util.UIUtils.calculateActionBarSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。