本文整理汇总了Java中android.widget.SeekBar.OnSeekBarChangeListener类的典型用法代码示例。如果您正苦于以下问题:Java OnSeekBarChangeListener类的具体用法?Java OnSeekBarChangeListener怎么用?Java OnSeekBarChangeListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OnSeekBarChangeListener类属于android.widget.SeekBar包,在下文中一共展示了OnSeekBarChangeListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ColorPickerAdvancedComponent
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* Initializes the views.
*
* @param rootView View that contains all the content, such as the label, gradient view, etc.
* @param textResourceId The resource ID of the text to show on the label.
* @param seekBarMax The range of the seek bar.
* @param seekBarListener The listener for when the seek bar value changes.
*/
ColorPickerAdvancedComponent(final View rootView,
final int textResourceId,
final int seekBarMax,
final OnSeekBarChangeListener seekBarListener) {
mGradientView = rootView.findViewById(R.id.gradient);
mText = (TextView) rootView.findViewById(R.id.text);
mText.setText(textResourceId);
mGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, null);
mSeekBar = (SeekBar) rootView.findViewById(R.id.seek_bar);
mSeekBar.setOnSeekBarChangeListener(seekBarListener);
mSeekBar.setMax(seekBarMax);
// Setting the thumb offset means the seek bar thumb can move all the way to each end
// of the gradient view.
Context context = rootView.getContext();
int offset = ApiCompatibilityUtils.getDrawable(context.getResources(),
R.drawable.color_picker_advanced_select_handle).getIntrinsicWidth();
mSeekBar.setThumbOffset(offset / 2);
}
示例2: ColorPickerAdvancedComponent
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* Initializes the views.
*
* @param rootView View that contains all the content, such as the label, gradient view, etc.
* @param textResourceId The resource ID of the text to show on the label.
* @param seekBarMax The range of the seek bar.
* @param seekBarListener The listener for when the seek bar value changes.
*/
ColorPickerAdvancedComponent(final View rootView,
final int textResourceId,
final int seekBarMax,
final OnSeekBarChangeListener seekBarListener) {
mGradientView = rootView.findViewById(R.id.gradient);
mText = (TextView) rootView.findViewById(R.id.text);
mText.setText(textResourceId);
mGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, null);
mSeekBar = (SeekBar) rootView.findViewById(R.id.seek_bar);
mSeekBar.setOnSeekBarChangeListener(seekBarListener);
mSeekBar.setMax(seekBarMax);
// Setting the thumb offset means the seek bar thumb can move all the way to each end
// of the gradient view.
Context context = rootView.getContext();
int offset = context.getResources()
.getDrawable(R.drawable.color_picker_advanced_select_handle)
.getIntrinsicWidth();
mSeekBar.setThumbOffset(offset / 2);
}
示例3: setOnSeekBarChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* 設置進度條的進度改變時的監聽事件
* @param l
*/
public void setOnSeekBarChangeListener(OnSeekBarChangeListener l){
if(m_seekBars[0] == null ||m_seekBars[1] == null){
return;
}
m_seekBars[0].setOnSeekBarChangeListener(l);
}
示例4: createAndAddNewGradient
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* Creates a new GradientDetails object from the parameters provided, initializes it,
* and adds it to this advanced view.
*
* @param textResourceId The text to display for the label.
* @param seekBarMax The maximum value of the seek bar for the gradient.
* @param seekBarListener Object listening to when the user changes the seek bar.
*
* @return A new GradientDetails object initialized with the given parameters.
*/
public ColorPickerAdvancedComponent createAndAddNewGradient(int textResourceId,
int seekBarMax,
OnSeekBarChangeListener seekBarListener) {
LayoutInflater inflater = (LayoutInflater) getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View newComponent = inflater.inflate(R.layout.color_picker_advanced_component, null);
addView(newComponent);
return new ColorPickerAdvancedComponent(newComponent,
textResourceId,
seekBarMax,
seekBarListener);
}
示例5: setOnSeekBarChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public OnSeekBarChangeListener setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
if (l instanceof ProxyChangeListener) {
listener = (ProxyChangeListener) l;
} else {
listener.setExternalListener(l);
}
return listener;
}
示例6: setOnSeekBarChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
/**
* @see SeekBar#setOnSeekBarChangeListener(OnSeekBarChangeListener)
*/
public W setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
mView.setOnSeekBarChangeListener(l);
return (W) this;
}
示例7: createVolumeChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createVolumeChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_VOLUME);
}
示例8: createBalanceChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createBalanceChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_BALANCE);
}
示例9: createReverbChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createReverbChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_REVERB);
}
示例10: createChorusChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createChorusChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_CHORUS);
}
示例11: createPhaserChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createPhaserChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_PHASER);
}
示例12: createTremoloChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
private OnSeekBarChangeListener createTremoloChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_TREMOLO);
}
示例13: setOnSeekBarChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public void setOnSeekBarChangeListener(OnSeekBarChangeListener onSeekBarChangeListener) {
getSeekbar().setOnSeekBarChangeListener(onSeekBarChangeListener);
}
示例14: setOnSeekBarPrefChangeListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
public void setOnSeekBarPrefChangeListener(OnSeekBarChangeListener listener) {
mExternalListener = listener;
}
示例15: bindOnSeekListener
import android.widget.SeekBar.OnSeekBarChangeListener; //导入依赖的package包/类
@BindingAdapter("onSeekListener")
public static void bindOnSeekListener(SeekBar seekBar, OnSeekBarChangeListener listener) {
seekBar.setOnSeekBarChangeListener(listener);
}