本文整理汇总了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));
}
示例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));
}
}
示例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));
}
}
示例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();
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}