本文整理了Java中android.widget.SeekBar.getHeight()
方法的一些代码示例,展示了SeekBar.getHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.getHeight()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:getHeight
暂无
代码示例来源:origin: techery/progresshint
private int getVerticalOffset() {
return -(mSeekBar.getHeight() + mPopupView.getMeasuredHeight() + mPopupOffset);
}
代码示例来源:origin: techery/progresshint
private int getHorizontalOffset() {
switch (getOrientation()) {
case CW:
return mPopupOffset;
case CCW:
return mSeekBar.getHeight() + mPopupOffset;
default:
throw new IllegalStateException("This widget orientation is not supported");
}
}
代码示例来源:origin: techery/progresshint
@Override public boolean isWidgetFullyVisible(View container) {
int relativeTop = ViewUtil.getRelativeTop(mSeekBar, container);
return (container.getScrollY() < relativeTop - mPopupView.getHeight() - mPopupOffset) // top edge
&& (container.getHeight() + container.getScrollY() - mPopupView.getHeight() - mPopupOffset
> relativeTop - mSeekBar.getHeight()); // bottom edge
}
}
代码示例来源:origin: techery/progresshint
private int getVerticalOffset(int progress) {
int followPosition = getFollowPosition(progress);
int yOddOffset;
switch (getOrientation()) {
case CW:
yOddOffset = mPopupView.getMeasuredHeight() / 2 + mSeekBar.getHeight() / 2 - 15;
return followPosition - yOddOffset;
case CCW:
yOddOffset = mPopupView.getMeasuredHeight() / 2 + mSeekBar.getHeight() * 2;
return -followPosition - yOddOffset;
default:
throw new IllegalStateException("This widget orientation is not supported");
}
}
代码示例来源:origin: techery/progresshint
private int getHorizontalOffset(int progress) {
return getFollowPosition(progress) - mPopupView.getMeasuredWidth() / 2 + mSeekBar.getHeight() / 2 + 15;
}
代码示例来源:origin: dwfox/DWRulerView
@Override
public boolean onPreDraw() {
if (seekBar.getHeight() > 0) {
Drawable thumb = res.getDrawable(R.drawable.indicator);
int h = seekBar.getMeasuredHeight();
int w = h;
Bitmap bmpOrg = ((BitmapDrawable) thumb).getBitmap();
Bitmap bmpScaled = Bitmap.createScaledBitmap(bmpOrg, w, h, true);
Drawable newThumb = new BitmapDrawable(res, bmpScaled);
newThumb.setBounds(0, 0, newThumb.getIntrinsicWidth(), newThumb.getIntrinsicHeight());
seekBar.setThumb(newThumb);
seekBar.getViewTreeObserver().removeOnPreDrawListener(this);
}
return true;
}
});
内容来源于网络,如有侵权,请联系作者删除!