Stay organized with collections
Save and categorize content based on your preferences.
View.OnLayoutChangeListener
public
static
interface
View.OnLayoutChangeListener
android.view.View.OnLayoutChangeListener
|
Interface definition for a callback to be invoked when the layout bounds of a view
changes due to layout processing.
Summary
Public methods |
abstract
void
|
onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
Called when the layout bounds of a view changes due to layout processing.
|
Public methods
onLayoutChange
public abstract void onLayoutChange (View v,
int left,
int top,
int right,
int bottom,
int oldLeft,
int oldTop,
int oldRight,
int oldBottom)
Called when the layout bounds of a view changes due to layout processing.
Parameters |
v |
View : The view whose bounds have changed. |
left |
int : The new value of the view's left property. |
top |
int : The new value of the view's top property. |
right |
int : The new value of the view's right property. |
bottom |
int : The new value of the view's bottom property. |
oldLeft |
int : The previous value of the view's left property. |
oldTop |
int : The previous value of the view's top property. |
oldRight |
int : The previous value of the view's right property. |
oldBottom |
int : The previous value of the view's bottom property. |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# View.OnLayoutChangeListener\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nView.OnLayoutChangeListener\n===========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/View.OnLayoutChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nView.OnLayoutChangeListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------|\n| android.view.View.OnLayoutChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when the layout bounds of a view\nchanges due to layout processing.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onLayoutChange](/reference/android/view/View.OnLayoutChangeListener#onLayoutChange(android.view.View,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int))`(`[View](/reference/android/view/View)` v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) ` Called when the layout bounds of a view changes due to layout processing. |\n\nPublic methods\n--------------\n\n### onLayoutChange\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onLayoutChange (View v, \n int left, \n int top, \n int right, \n int bottom, \n int oldLeft, \n int oldTop, \n int oldRight, \n int oldBottom)\n```\n\nCalled when the layout bounds of a view changes due to layout processing.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------|\n| `v` | `View`: The view whose bounds have changed. \u003cbr /\u003e |\n| `left` | `int`: The new value of the view's left property. \u003cbr /\u003e |\n| `top` | `int`: The new value of the view's top property. \u003cbr /\u003e |\n| `right` | `int`: The new value of the view's right property. \u003cbr /\u003e |\n| `bottom` | `int`: The new value of the view's bottom property. \u003cbr /\u003e |\n| `oldLeft` | `int`: The previous value of the view's left property. \u003cbr /\u003e |\n| `oldTop` | `int`: The previous value of the view's top property. \u003cbr /\u003e |\n| `oldRight` | `int`: The previous value of the view's right property. \u003cbr /\u003e |\n| `oldBottom` | `int`: The previous value of the view's bottom property. \u003cbr /\u003e |"]]