本文整理匯總了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);
}