Stay organized with collections
Save and categorize content based on your preferences.
SeekBar.OnSeekBarChangeListener
public
static
interface
SeekBar.OnSeekBarChangeListener
android.widget.SeekBar.OnSeekBarChangeListener
|
A callback that notifies clients when the progress level has been
changed. This includes changes that were initiated by the user through a
touch gesture or arrow key/trackball as well as changes that were initiated
programmatically.
Summary
Public methods
public abstract void onProgressChanged (SeekBar seekBar,
int progress,
boolean fromUser)
Notification that the progress level has changed. Clients can use the fromUser parameter
to distinguish user-initiated changes from those that occurred programmatically.
Parameters |
seekBar |
SeekBar : The SeekBar whose progress has changed |
progress |
int : The current progress level. This will be in the range min..max where min
and max were set by ProgressBar.setMin(int) and
ProgressBar.setMax(int) , respectively. (The default values for
min is 0 and max is 100.) |
fromUser |
boolean : True if the progress change was initiated by the user. |
public abstract void onStartTrackingTouch (SeekBar seekBar)
Notification that the user has started a touch gesture. Clients may want to use this
to disable advancing the seekbar.
Parameters |
seekBar |
SeekBar : The SeekBar in which the touch gesture began |
public abstract void onStopTrackingTouch (SeekBar seekBar)
Notification that the user has finished a touch gesture. Clients may want to use this
to re-enable advancing the seekbar.
Parameters |
seekBar |
SeekBar : The SeekBar in which the touch gesture began |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# SeekBar.OnSeekBarChangeListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nSeekBar.OnSeekBarChangeListener\n===============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/SeekBar.OnSeekBarChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nSeekBar.OnSeekBarChangeListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------|\n| android.widget.SeekBar.OnSeekBarChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA callback that notifies clients when the progress level has been\nchanged. This includes changes that were initiated by the user through a\ntouch gesture or arrow key/trackball as well as changes that were initiated\nprogrammatically.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onProgressChanged](/reference/android/widget/SeekBar.OnSeekBarChangeListener#onProgressChanged(android.widget.SeekBar,%20int,%20boolean))`(`[SeekBar](/reference/android/widget/SeekBar)` seekBar, int progress, boolean fromUser) ` Notification that the progress level has changed. |\n| ` abstract void` | ` `[onStartTrackingTouch](/reference/android/widget/SeekBar.OnSeekBarChangeListener#onStartTrackingTouch(android.widget.SeekBar))`(`[SeekBar](/reference/android/widget/SeekBar)` seekBar) ` Notification that the user has started a touch gesture. |\n| ` abstract void` | ` `[onStopTrackingTouch](/reference/android/widget/SeekBar.OnSeekBarChangeListener#onStopTrackingTouch(android.widget.SeekBar))`(`[SeekBar](/reference/android/widget/SeekBar)` seekBar) ` Notification that the user has finished a touch gesture. |\n\nPublic methods\n--------------\n\n### onProgressChanged\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onProgressChanged (SeekBar seekBar, \n int progress, \n boolean fromUser)\n```\n\nNotification that the progress level has changed. Clients can use the fromUser parameter\nto distinguish user-initiated changes from those that occurred programmatically.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `seekBar` | `SeekBar`: The SeekBar whose progress has changed \u003cbr /\u003e |\n| `progress` | `int`: The current progress level. This will be in the range min..max where min and max were set by [ProgressBar.setMin(int)](/reference/android/widget/ProgressBar#setMin(int)) and [ProgressBar.setMax(int)](/reference/android/widget/ProgressBar#setMax(int)), respectively. (The default values for min is 0 and max is 100.) \u003cbr /\u003e |\n| `fromUser` | `boolean`: True if the progress change was initiated by the user. \u003cbr /\u003e |\n\n### onStartTrackingTouch\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onStartTrackingTouch (SeekBar seekBar)\n```\n\nNotification that the user has started a touch gesture. Clients may want to use this\nto disable advancing the seekbar.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------------|\n| `seekBar` | `SeekBar`: The SeekBar in which the touch gesture began \u003cbr /\u003e |\n\n### onStopTrackingTouch\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onStopTrackingTouch (SeekBar seekBar)\n```\n\nNotification that the user has finished a touch gesture. Clients may want to use this\nto re-enable advancing the seekbar.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------------|\n| `seekBar` | `SeekBar`: The SeekBar in which the touch gesture began \u003cbr /\u003e |"]]