Java 类android.widget.SeekBar.OnSeekBarChangeListener 实例源码
项目:365browser
文件:ColorPickerAdvancedComponent.java
/**
* 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);
}
项目:android-chromium-view
文件:ColorPickerAdvancedComponent.java
/**
* 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);
}
项目:android-chromium
文件:ColorPickerAdvancedComponent.java
/**
* 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);
}
项目:chromium_webview
文件:ColorPickerAdvancedComponent.java
/**
* 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);
}
项目:cordova-android-chromium
文件:ColorPickerAdvancedComponent.java
/**
* 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);
}
项目:WiCamera3D
文件:CSSeekBar.java
/**
* 設置進度條的進度改變時的監聽事件
* @param l
*/
public void setOnSeekBarChangeListener(OnSeekBarChangeListener l){
if(m_seekBars[0] == null ||m_seekBars[1] == null){
return;
}
m_seekBars[0].setOnSeekBarChangeListener(l);
}
项目:365browser
文件:ColorPickerAdvanced.java
/**
* 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);
}
项目:progresshint
文件:ProgressHintDelegate.java
public OnSeekBarChangeListener setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
if (l instanceof ProxyChangeListener) {
listener = (ProxyChangeListener) l;
} else {
listener.setExternalListener(l);
}
return listener;
}
项目:android-chromium-view
文件:ColorPickerAdvanced.java
/**
* 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);
}
项目:android-chromium
文件:ColorPickerAdvanced.java
/**
* 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);
}
项目:chromium_webview
文件:ColorPickerAdvanced.java
/**
* 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);
}
项目:cordova-android-chromium
文件:ColorPickerAdvanced.java
/**
* 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);
}
项目:AndroidViewHelper
文件:SeekBarWrapper.java
/**
* @see SeekBar#setOnSeekBarChangeListener(OnSeekBarChangeListener)
*/
public W setOnSeekBarChangeListener(OnSeekBarChangeListener l) {
mView.setOnSeekBarChangeListener(l);
return (W) this;
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createVolumeChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_VOLUME);
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createBalanceChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_BALANCE);
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createReverbChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_REVERB);
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createChorusChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_CHORUS);
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createPhaserChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_PHASER);
}
项目:tuxguitar
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createTremoloChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_TREMOLO);
}
项目:vdb-android
文件:SeekbarWithIntervals.java
public void setOnSeekBarChangeListener(OnSeekBarChangeListener onSeekBarChangeListener) {
getSeekbar().setOnSeekBarChangeListener(onSeekBarChangeListener);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createVolumeChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_VOLUME);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createBalanceChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_BALANCE);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createReverbChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_REVERB);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createChorusChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_CHORUS);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createPhaserChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_PHASER);
}
项目:TuxGuitar-1.3.1-fork
文件:TGChannelEditDialog.java
private OnSeekBarChangeListener createTremoloChangeListener() {
return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_TREMOLO);
}
项目:QuickControlPanel
文件:SliderPreference.java
public void setOnSeekBarPrefChangeListener(OnSeekBarChangeListener listener) {
mExternalListener = listener;
}
项目:Jockey
文件:NowPlayingControllerViewModel.java
@BindingAdapter("onSeekListener")
public static void bindOnSeekListener(SeekBar seekBar, OnSeekBarChangeListener listener) {
seekBar.setOnSeekBarChangeListener(listener);
}
项目:ardroid-export
文件:TrackListViewAdaptor.java
public void setOnSeekBarChangeListener (OnSeekBarChangeListener onSeekBarChangeListener) {
this.onSeekBarChangeListener = onSeekBarChangeListener;
}
项目:progresshint
文件:ProgressHintDelegate.java
public void setInternalListener(OnSeekBarChangeListener l) {
mInternalListener = l;
}
项目:progresshint
文件:ProgressHintDelegate.java
public void setExternalListener(OnSeekBarChangeListener l) {
mExternalListener = l;
}
项目:QuickControlPanel
文件:SliderPreference.java
public void setOnSeekBarPrefChangeListener(OnSeekBarChangeListener listener) {
mExternalListener = listener;
}
项目:CareerStack
文件:SeekBarWrapper.java
/** Sets an additional OnSeekBarChangeListener to be called after the
* helper performs its actions.
* @param extraListener The listener to append to this. */
public void setOnSeekBarChangeListener(OnSeekBarChangeListener extraListener) {
this.extraListener = extraListener;
}
项目:AndroidSeekBarPreference
文件:SeekBarPreference.java
/**
* Set a listener for events from the SeekBar.
* @param listener The listener.
*/
public void setOnSeekBarChangeListener(OnSeekBarChangeListener listener) {
mListener = listener;
}
项目:scrumdailytimer
文件:SlotSeekBarController.java
/**
* For testing.
*
* @return listener.
*/
OnSeekBarChangeListener getListener() {
return mListener;
}