android.widget.SeekBar.setPadding()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(170)

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

SeekBar.setPadding介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

sb.setMax(maxs[i]);
sb.setOnSeekBarChangeListener(l);
sb.setPadding(20, 20, 20, 0);
ll.addView(sb);

代码示例来源:origin: PangHaHa12138/Loading

indicatorTextStyle);
mSeekBar.setPadding(mSeekBar.getPaddingLeft() + mSeekBarMarginLeft,
    mSeekBar.getPaddingTop() + mSeekBarMarginTop,
    mSeekBar.getPaddingRight() + mSeekBarMarginRight,

代码示例来源:origin: dwfox/DWRulerView

private void addCompoenet() {
  removeAllViews();
  LineRulerView lineRulerView = new LineRulerView(context);
  LayoutParams rulerLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getHeight() / 3 * 2);
  rulerLayoutParams.addRule(ALIGN_PARENT_BOTTOM);
  lineRulerView.setLayoutParams(rulerLayoutParams);
  lineRulerView.setMinMaxValue(seekbarMinValue, seekbarMaxValue + 1);
  lineRulerView.setBackgroundColor(Color.DKGRAY);
  addView(lineRulerView);
  seekBar = new SeekBar(context);
  LayoutParams seekbarLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getHeight() / 3);
  seekbarLayoutParams.addRule(ALIGN_PARENT_TOP);
  seekBar.setLayoutParams(seekbarLayoutParams);
  seekBar.setBackgroundColor(Color.DKGRAY);
  seekBar.setProgressDrawable(null);
  seekBar.setPadding(0, 0, 0, 0);
  seekBar.setOnSeekBarChangeListener(this);
  seekBar.setMax(seekbarMaxValue - seekbarMinValue + 1);
  setSeekberThumb(seekBar, context.getResources());
  addView(seekBar);
}

代码示例来源:origin: TrustWallet/trust-wallet-android-source

gasLimitInfoText = findViewById(R.id.gas_limit_info_text);
gasPriceSlider.setPadding(0, 0, 0, 0);
gasLimitSlider.setPadding(0, 0, 0, 0);

代码示例来源: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: AntonioRedondo/AnotherMonitor

int paddingLeft = mSBWidth.getPaddingLeft();
int paddingRight = mSBWidth.getPaddingRight();
mSBWidth.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom + navigationBarHeight);

相关文章

SeekBar类方法