本文整理了Java中android.widget.SeekBar.setBackgroundColor()
方法的一些代码示例,展示了SeekBar.setBackgroundColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.setBackgroundColor()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:setBackgroundColor
暂无
代码示例来源:origin: stackoverflow.com
seekBar.setProgress(1);
seekBar.setVisibility(View.VISIBLE);
seekBar.setBackgroundColor(Color.BLUE);
代码示例来源:origin: Swati4star/Images-to-PDF
@Override
public void onItemClick(int position) {
int color = mBrushItems.get(position).getColor();
doodleSeekBar.setBackgroundColor(this.getResources().getColor(color));
mPhotoEditor.setBrushColor(this.getResources().getColor(color));
}
代码示例来源:origin: stackoverflow.com
TableRow tr = new TableRow(this);
tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
/* Create a SeekBar to be the row-content. */
SeekBar seekBar = new SeekBar(this);
seekBar.setMax(15);
// seekBar.setIndeterminate(true);
ShapeDrawable thumb = new ShapeDrawable(new OvalShape());
thumb.setIntrinsicHeight(80);
thumb.setIntrinsicWidth(30);
seekBar.setThumb(thumb);
seekBar.setProgress(1);
seekBar.setVisibility(View.VISIBLE);
seekBar.setBackgroundColor(Color.BLUE);
LayoutParams lp = new LayoutParams(200, 50);
seekBar.setLayoutParams(lp);
seekBar.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!