Repository navigation
SeekBarEvents
Since AndroidAnnotations 2.7
You can bind methods to handle specific events from SeekBar view.
This annotation is intended to be used on methods to receive events defined by SeekBar.OnSeekBarChangeListener.onProgressChanged(SeekBar, int, boolean) when the progress level of a SeekBar view has changed.
The annotation value should be one or several R.id.* fields that refers to an android.widget.SeekBar. If not set, the method name will be used as the R.id.* field name.
The method may have multiple parameter :
- A
android.widget.SeekBarparameter to determine which view has targeted this event - An
intparameter named progress to get the progress level of the SeekBar - A
booleanparameter named fromUser to determine if this event is triggered by the user
All of those parameters are parameter are optional.
Some usage examples of @SeekBarProgressChange annotation:
@SeekBarProgressChange(R.id.seekBar)
void onProgressChangeOnSeekBar(SeekBar seekBar, int progress, boolean fromUser) {
// Something Here
}
@SeekBarProgressChange(R.id.seekBar)
void onProgressChangeOnSeekBar(SeekBar seekBar, int progress) {
// Something Here
}
@SeekBarProgressChange({R.id.seekBar1, R.id.seekBar2})
void onProgressChangeOnSeekBar(SeekBar seekBar) {
// Something Here
}
@SeekBarProgressChange({R.id.seekBar1, R.id.seekBar2})
void onProgressChangeOnSeekBar() {
// Something Here
}Those annotations are intended to be used on methods to receive events defined by SeekBar.OnSeekBarChangeListener.onStartTrackingTouch(SeekBar seekBar) and SeekBar.OnSeekBarChangeListener.onStopTrackingTouch(SeekBar seekBar) when the user has started or finished to move the cursor of the targeted SeekBar.
The annotation value should be one or several R.id.* fields that refers to an android.widget.SeekBar. If not set, the method name will be used as the R.id.* field name.
The method can have zero or one parameter of type SeekBar.
19/11/2020 The 4.8.0 release is out !
- Get started!
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter