android.widget.SeekBar.OnSeekBarChangeListener Java Examples
The following examples show how to use
android.widget.SeekBar.OnSeekBarChangeListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColorPickerAdvancedComponent.java From 365browser with Apache License 2.0 | 6 votes |
/** * 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); }
Example #2
Source File: ColorPickerAdvancedComponent.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
/** * 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); }
Example #3
Source File: ColorPickerAdvancedComponent.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
/** * 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); }
Example #4
Source File: ColorPickerAdvanced.java From 365browser with Apache License 2.0 | 5 votes |
/** * 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); }
Example #5
Source File: ProgressHintDelegate.java From progresshint with Apache License 2.0 | 5 votes |
public OnSeekBarChangeListener setOnSeekBarChangeListener(@NonNull OnSeekBarChangeListener l) { if (l instanceof ProxyChangeListener) { listener = (ProxyChangeListener) l; } else { listener.setExternalListener(l); } return listener; }
Example #6
Source File: ColorPickerAdvanced.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * 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); }
Example #7
Source File: ColorPickerAdvanced.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * 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); }
Example #8
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createVolumeChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_VOLUME); }
Example #9
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createBalanceChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_BALANCE); }
Example #10
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createReverbChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_REVERB); }
Example #11
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createChorusChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_CHORUS); }
Example #12
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createPhaserChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_PHASER); }
Example #13
Source File: TGChannelEditDialog.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
private OnSeekBarChangeListener createTremoloChangeListener() { return createShortLevelChangeListener(TGUpdateChannelAction.ATTRIBUTE_TREMOLO); }
Example #14
Source File: NowPlayingControllerViewModel.java From Jockey with Apache License 2.0 | 4 votes |
@BindingAdapter("onSeekListener") public static void bindOnSeekListener(SeekBar seekBar, OnSeekBarChangeListener listener) { seekBar.setOnSeekBarChangeListener(listener); }
Example #15
Source File: ProgressHintDelegate.java From progresshint with Apache License 2.0 | 4 votes |
void setInternalListener(OnSeekBarChangeListener l) { mInternalListener = l; }
Example #16
Source File: ProgressHintDelegate.java From progresshint with Apache License 2.0 | 4 votes |
void setExternalListener(OnSeekBarChangeListener l) { mExternalListener = l; }