本文整理汇总了Java中android.widget.SeekBar.setEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java SeekBar.setEnabled方法的具体用法?Java SeekBar.setEnabled怎么用?Java SeekBar.setEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.SeekBar
的用法示例。
在下文中一共展示了SeekBar.setEnabled方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateBars
import android.widget.SeekBar; //导入方法依赖的package包/类
private void updateBars()
{
try
{
for (Map.Entry<Short, SeekBar> entry : bars.entrySet())
{
short band = entry.getKey();
SeekBar bar = entry.getValue();
bar.setEnabled(equalizer.getEnabled());
short minEQLevel = equalizer.getBandLevelRange()[0];
bar.setProgress(equalizer.getBandLevel(band) - minEQLevel);
}
}
catch (Exception ex)
{
//TODO: Show a dialog
}
}
示例2: findView
import android.widget.SeekBar; //导入方法依赖的package包/类
private void findView() {
readDrawer = (DrawerLayout) findViewById(R.id.read_drawer);
readSide = (LinearLayout) findViewById(R.id.read_side);
readRvSection = (RecyclerView) findViewById(R.id.read_rv_section);
readView = (PageView) findViewById(R.id.pv_read);
appBar = (AppBarLayout) findViewById(R.id.appbar);
readBottom = findViewById(R.id.read_bottom);
readTvPreChapter = (TextView) findViewById(R.id.read_tv_pre_chapter);
readSbChapterProgress = (SeekBar) findViewById(R.id.read_sb_chapter_progress);
readTvNextChapter = (TextView) findViewById(R.id.read_tv_next_chapter);
readTvCategory = (TextView) findViewById(R.id.read_tv_category);
readTvNightMode = (TextView) findViewById(R.id.read_tv_night_mode);
readTvSetting = (TextView) findViewById(R.id.read_tv_setting);
tvSectionName=findViewById(R.id.tv_section_name);
readSectionProgress=findViewById(R.id.ll_section_progress);
readTvSectionProgress=findViewById(R.id.tv_section_progress);
readSbChapterProgress.setEnabled(false);
}
示例3: lockBrightnessControls
import android.widget.SeekBar; //导入方法依赖的package包/类
private void lockBrightnessControls(boolean lock) {
SeekBar slider = (SeekBar) findViewById(R.id.slider);
ListView profileList = (ListView) findViewById(R.id.profile_list);
// Note: setEnabled() doesn't seem to work with this ListView, nor does
// calling setEnabled() on the individual children of the ListView.
// The items become grayed out, but the click handlers are still registered.
// As a work around, simply hide the entire list view.
if (lock) {
profileList.setVisibility(View.GONE);
slider.setEnabled(false);
} else {
profileList.setVisibility(View.VISIBLE);
slider.setEnabled(true);
}
}
示例4: updateView
import android.widget.SeekBar; //导入方法依赖的package包/类
private void updateView() {
mSwitchBeauty.setImageResource(isOpen ? R.drawable.kai : R.drawable.guan);
for (SeekBarRow row : seekBarRowList) {
SeekBar seekBar = row.seekBar;
seekBar.setEnabled(isOpen);
}
}
示例5: updateView
import android.widget.SeekBar; //导入方法依赖的package包/类
private void updateView() {
mSwitchBeautySecond.setImageResource(isOpen ? R.drawable.kai : R.drawable.guan);
for (SeekBarRow row : seekBarRowList) {
SeekBar seekBar = row.seekBar;
seekBar.setEnabled(isOpen);
}
}
示例6: onBindView
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
protected void onBindView(View view) {
super.onBindView(view);
SeekBar seekBar = (SeekBar) view.findViewById(R.id.seekbar);
seekBar.setOnSeekBarChangeListener(this);
seekBar.setMax(prefValueToSeekBarProgress(mMax));
seekBar.setProgress(prefValueToSeekBarProgress(mValue));
seekBar.setEnabled(isEnabled());
mSummaryView = (TextView) view.findViewById(R.id.seekbar_amount);
mSummaryView.setText(mSummary);
}
示例7: onCheckedChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mChecked = isChecked;
// update flag immediately
setUseRingerVolume(mChecked);
SeekBar seek = mNotificationHolder.seek;
if (isChecked) {
seek.setEnabled(false);
seek.setProgress(mRingerHolder.seek.getProgress());
mNotificationHolder.text.setText(mRingerHolder.text.getText());
} else {
seek.setEnabled(true);
}
}
示例8: onBindView
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
protected void onBindView(View view) {
Log.i(TAG, "SeekbarPreference----onBindView");
super.onBindView(view);
progress = getPersistedInt(60);
seekBar = (SeekBar) view.findViewById(R.id.id_seekbar_threshold);
textView = (TextView) view.findViewById(R.id.id_tv_threshold_value);
seekBar.setMax(maxValue);
seekBar.setProgress(progress);
seekBar.setEnabled(isEnabled());
seekBar.setOnSeekBarChangeListener(this);
textView.setText(getSummary());
}
示例9: SeekbarPreference
import android.widget.SeekBar; //导入方法依赖的package包/类
public SeekbarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
seekBar = new SeekBar(context,attrs);
seekBar.setEnabled(true);
setLayoutResource(R.layout.preference_seekbar);
}