本文整理了Java中android.widget.SeekBar.setKeyProgressIncrement()
方法的一些代码示例,展示了SeekBar.setKeyProgressIncrement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.setKeyProgressIncrement()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:setKeyProgressIncrement
暂无
代码示例来源:origin: stackoverflow.com
public void ShowDialog(){
final AlertDialog.Builder popDialog = new AlertDialog.Builder(this);
final SeekBar seek = new SeekBar(this);
seek.setMax(255);
seek.setKeyProgressIncrement(1);
popDialog.setIcon(android.R.drawable.btn_star_big_on);
popDialog.setTitle("Please Select Into Your Desired Brightness ");
popDialog.setView(seek);
seek.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser){
txtView.setText("Value of : " + progress);
}
代码示例来源:origin: stackoverflow.com
//This is the code you seek!
public void ShowDialog(){
final AlertDialog.Builder popDialog = new AlertDialog.Builder(this);
final SeekBar seek = new SeekBar(this);
seek.setMax(255);
seek.setKeyProgressIncrement(1);
popDialog.setIcon(android.R.drawable.btn_star_big_on);
popDialog.setTitle("Please Select Into Your Desired Brightness ");
popDialog.setView(seek);
seek.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser){
txtView.setText("Value of : " + progress);
}
代码示例来源:origin: PrivacyApps/document-viewer
@Override
protected View onCreateDialogView() {
final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View view = inflater.inflate(R.layout.pref_seek_dialog, null);
try {
currentValue = Integer.parseInt(getPersistedString(Integer.toString(defaultValue)));
} catch (NumberFormatException ex) {
currentValue = minValue;
}
((TextView) view.findViewById(R.id.pref_seek_min_value)).setText(Integer.toString(minValue));
((TextView) view.findViewById(R.id.pref_seek_max_value)).setText(Integer.toString(maxValue));
seekBar = (SeekBar) view.findViewById(R.id.pref_seek_bar);
seekBar.setMax(maxValue - minValue);
seekBar.setProgress(currentValue - minValue);
seekBar.setKeyProgressIncrement(1);
seekBar.setOnSeekBarChangeListener(this);
text = (TextView) view.findViewById(R.id.pref_seek_current_value);
text.setText(Integer.toString(currentValue));
handler.init(new IViewContainer.ViewBridge(view), seekBar, R.id.pref_seek_bar_minus, R.id.pref_seek_bar_plus);
return view;
}
代码示例来源:origin: stackoverflow.com
brightbar.setKeyProgressIncrement(1);
代码示例来源:origin: stackoverflow.com
window = getWindow();
brightbar.setMax(255);
brightbar.setKeyProgressIncrement(1);
代码示例来源:origin: konradrenner/kolabnotes-android
seekBar.setMax(MAX_BRUSH_SIZE);
seekBar.setProgress(mSize);
seekBar.setKeyProgressIncrement(1);
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
代码示例来源:origin: stackoverflow.com
brightbar.setKeyProgressIncrement(1);
代码示例来源:origin: stackoverflow.com
sbVolume.setKeyProgressIncrement(1);
sbBrightness.setKeyProgressIncrement(1);
代码示例来源:origin: consp1racy/android-support-preference
@Override
public void onBindViewHolder(@NonNull final PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
final SeekBar seekBar = (SeekBar) holder.findViewById(R.id.seekbar);
//noinspection ConstantConditions
if (seekBar == null) {
Log.e(TAG, "SeekBar view is null in onBindViewHolder.");
return;
}
holder.itemView.setOnKeyListener(buildSeekBarKeyListener(seekBar));
final TextView info = (TextView) holder.findViewById(R.id.seekbar_value);
if (info != null) {
replaceInfoView(info);
bindInfo(info);
bindInfoAnchor(info);
}
seekBar.setOnSeekBarChangeListener(mSeekBarChangeListener);
seekBar.setMax(mMax - mMin);
// If the increment is not zero, use that. Otherwise, use the default mKeyProgressIncrement
// in AbsSeekBar when it's zero. This default increment value is set by AbsSeekBar
// after calling setMax. That's why it's important to call setKeyProgressIncrement after
// calling setMax() since setMax() can change the increment value.
if (mSeekBarIncrement != 0) {
seekBar.setKeyProgressIncrement(mSeekBarIncrement);
} else {
mSeekBarIncrement = seekBar.getKeyProgressIncrement();
}
seekBar.setProgress(mSeekBarValue - mMin);
seekBar.setEnabled(isEnabled());
}
内容来源于网络,如有侵权,请联系作者删除!