forked from androidannotations/androidannotations
-
Notifications
You must be signed in to change notification settings - Fork 0
SeekBarEvents
matboniface edited this page Aug 18, 2012
·
12 revisions
Since AndroidAnnotations 2.7
You can bind methods to handle 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 int parameter named progress to get the progress level of the SeekBar
- A boolean parameter named fromUser to determine if this event is triggered by the user
All of those parameters are parameter are optional.
Some usage examples of @ProgressChange annotation:
@ProgressChange(R.id.seekBar)
void onProgressChangeOnSeekBar(SeekBar seekBar, int progress, boolean fromUser) {
// Something Here
}
@ProgressChange(R.id.seekBar)
void onProgressChangeOnSeekBar(SeekBar seekBar, int progress) {
// Something Here
}
@ProgressChange({R.id.seekBar1, R.id.seekBar2})
void onProgressChangeOnSeekBar(SeekBar seekBar) {
// Something Here
}AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/11/2012 The 2.7 release is out
- Get started!
- Download
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow