本文整理了Java中android.widget.ImageButton.getMeasuredHeight()
方法的一些代码示例,展示了ImageButton.getMeasuredHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.getMeasuredHeight()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:getMeasuredHeight
暂无
代码示例来源:origin: wdullaer/MaterialDateTimePicker
final int leftDH = leftButton.getMeasuredHeight();
final int leftIconTop = topMargin + monthView.getPaddingTop() + (monthHeight - leftDH) / 2;
final int leftIconLeft = edgePadding + (cellWidth - leftDW) / 2;
final int rightDH = rightButton.getMeasuredHeight();
final int rightIconTop = topMargin + monthView.getPaddingTop() + (monthHeight - rightDH) / 2;
final int rightIconRight = width - edgePadding - (cellWidth - rightDW) / 2 - 2;
代码示例来源:origin: fython/BreadcrumbsView
@Override
public void onGlobalLayout() {
popupWindow.setVerticalOffset(-imageButton.getMeasuredHeight() + DROPDOWN_OFFSET_Y_FIX);
imageButton.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
代码示例来源:origin: gateship-one/odyssey
/**
* Asks the ViewGroup about the size of all its children and paddings around.
*
* @param widthMeasureSpec The width requirements for this view
* @param heightMeasureSpec The height requirements for this view
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//super.onMeasure(widthMeasureSpec, heightMeasureSpec);
measureChildren(widthMeasureSpec, heightMeasureSpec);
int maxWidth = MeasureSpec.getSize(widthMeasureSpec);
int maxHeight = MeasureSpec.getSize(heightMeasureSpec);
setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, 0),
resolveSizeAndState(maxHeight, heightMeasureSpec, 0));
// Calculate the margin to smoothly resize text field
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) mHeaderTextLayout.getLayoutParams();
layoutParams.setMarginEnd((int) (mTopPlaylistButton.getMeasuredHeight() * (1.0 - mDragOffset)));
mHeaderTextLayout.setLayoutParams(layoutParams);
}
代码示例来源:origin: lime-ime/limeime
btnClose.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
mCloseButtonHeight = btnClose.getMeasuredHeight();
内容来源于网络,如有侵权,请联系作者删除!