android.widget.ImageButton.getMeasuredHeight()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中android.widget.ImageButton.getMeasuredHeight()方法的一些代码示例,展示了ImageButton.getMeasuredHeight()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.getMeasuredHeight()方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:getMeasuredHeight

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();

相关文章

ImageButton类方法