本文整理了Java中android.widget.SeekBar.getLocationOnScreen()
方法的一些代码示例,展示了SeekBar.getLocationOnScreen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.getLocationOnScreen()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:getLocationOnScreen
暂无
代码示例来源:origin: techery/progresshint
@Override
protected PointF getHintDragCoordinates(MotionEvent event) {
mSeekBar.getLocationOnScreen(tmpCoords);
float x;
float y = mSeekBar.getY();
switch (getOrientation()) {
case CW:
x = event.getRawY() - tmpCoords[1];
break;
case CCW:
x = tmpCoords[1] - event.getRawY();
break;
default:
throw new IllegalStateException("This widget orientation is not supported");
}
return new PointF(x, y);
}
代码示例来源:origin: bitmovin/bitcodin-android-demo
private void updateTooltipPosition() {
this.playerSeekBar.getLocationOnScreen(this.playerSeekBarPosition);
this.tooltipWrapper.setY(
this.playerSeekBarPosition[1] -
this.tooltipWrapper.getHeight() +
Utils.toPx(this.context, 17)
);
this.tooltipWrapper.setX(
this.playerSeekBarPosition[0] +
Utils.toPx(this.context, 5) +
(int) (
((float) this.playerSeekBar.getProgress() /
(float) this.playerSeekBar.getMax()) *
((float) this.playerSeekBar.getWidth() -
Utils.toPx(this.context, 10))
) - (this.tooltipWrapper.getWidth() / 2)
);
}
内容来源于网络,如有侵权,请联系作者删除!