本文整理了Java中android.widget.SeekBar.getPaddingRight()
方法的一些代码示例,展示了SeekBar.getPaddingRight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.getPaddingRight()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:getPaddingRight
暂无
代码示例来源:origin: stackoverflow.com
return;
float contentWidth = this.getPaint().measureText(content);
int realWidth = width - seekBar.getPaddingLeft() - seekBar.getPaddingRight();
int maxLimit = (int) (width - contentWidth - seekBar.getPaddingRight());
int minLimit = seekBar.getPaddingLeft();
float percent = (float) (1.0 * seekBar.getProgress() / seekBar.getMax());
代码示例来源:origin: techery/progresshint
protected int getFollowPosition(int progress) {
return (int) (progress * (mSeekBar.getWidth() - mSeekBar.getPaddingLeft() - mSeekBar.getPaddingRight()) / (float) mSeekBar.getMax());
}
代码示例来源:origin: techery/progresshint
@Override public boolean isWidgetFullyVisible(View container) {
int relativeTop = ViewUtil.getRelativeTop(mSeekBar, container);
int followPosition = getFollowPosition(getPopupStyle() == POPUP_FOLLOW ? mSeekBar.getProgress() : mSeekBar.getMax() / 2);
//
boolean fitsTop;
boolean fitsBottom;
switch (getOrientation()) {
case CW:
fitsTop =
relativeTop + followPosition + mSeekBar.getPaddingLeft() - mPopupView.getHeight() / 2 > container.getScrollY();
fitsBottom = container.getHeight() + container.getScrollY() >
relativeTop + followPosition + mSeekBar.getPaddingRight() + mPopupView.getHeight() / 2;
break;
case CCW:
fitsTop = relativeTop + (mSeekBar.getWidth() - followPosition) - mPopupView.getHeight() > container.getScrollY();
fitsBottom = container.getHeight() + container.getScrollY() + (followPosition + mSeekBar.getPaddingLeft()) >
relativeTop + mSeekBar.getWidth() + mPopupView.getHeight() / 2;
break;
default:
throw new IllegalStateException("This widget orientation is not supported");
}
//
return fitsTop && fitsBottom;
}
}
代码示例来源:origin: stackoverflow.com
public int getSeekBarThumbPosX(SeekBar seekBar) {
int posX;
if (Build.VERSION.SDK_INT >= 16) {
posX = seekBar.getThumb().getBounds().centerX();
} else {
int left = seekBar.getLeft() + seekBar.getPaddingLeft();
int right = seekBar.getRight() - seekBar.getPaddingRight();
float width = (float) (seekBar.getProgress() * (right - left)) / seekBar.getMax();
posX = Math.round(width) + seekBar.getThumbOffset();
}
return posX;
}
代码示例来源:origin: PangHaHa12138/Loading
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onGlobalLayout() {
mMeasuredWidth = mSeekBar.getWidth()
- mSeekBar.getPaddingLeft()
- mSeekBar.getPaddingRight();
mSeekBar.setPadding(
mSeekBar.getPaddingLeft(),
mSeekBar.getPaddingTop()
+ mWrapperIndicator.getHeight(),
mSeekBar.getPaddingRight(),
mSeekBar.getPaddingBottom());
setIndicator();
getViewTreeObserver()
.removeOnGlobalLayoutListener(this);
}
});
代码示例来源:origin: stackoverflow.com
int width = seekBar.getWidth() - seekBar.getPaddingLeft() - seekBar.getPaddingRight();
double progress = mProgress == 0 ? seekBar.getProgress() : mProgress;
int xPosition = (int) (seekBar.getPaddingLeft() + width * progress / seekBar.getMax());
代码示例来源:origin: stackoverflow.com
int max = seekBar.getMax();
int available = seekBar.getWidth() - seekBar.getPaddingLeft() - seekBar.getPaddingRight();
float scale = max > 0 ? (float) seekBar.getProgress() / (float) max : 0;
代码示例来源:origin: PangHaHa12138/Loading
mSeekBar.getPaddingRight() + mSeekBarMarginRight,
mSeekBar.getPaddingBottom() + mSeekBarMarginBottom);
setIndicatorImage(arr);
代码示例来源:origin: AntonioRedondo/AnotherMonitor
int paddingBottom = mSBWidth.getPaddingBottom();
int paddingLeft = mSBWidth.getPaddingLeft();
int paddingRight = mSBWidth.getPaddingRight();
mSBWidth.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom + navigationBarHeight);
内容来源于网络,如有侵权,请联系作者删除!