Stay organized with collections
Save and categorize content based on your preferences.
ConstraintsChangedListener
public
abstract
class
ConstraintsChangedListener
extends Object
java.lang.Object
|
↳ |
android.support.constraint.ConstraintsChangedListener
|
Added in 2.0
Callbacks on state change
Summary
Public methods |
void
|
postLayoutChange(int stateId, int constraintId)
called after layout happens
|
void
|
preLayoutChange(int stateId, int constraintId)
called before layout happens
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
ConstraintsChangedListener
public ConstraintsChangedListener ()
Public methods
postLayoutChange
public void postLayoutChange (int stateId,
int constraintId)
called after layout happens
Parameters |
stateId |
int : -1 if state unknown, otherwise the current state |
constraintId |
int : the current constraintSet id we transitioned to
|
preLayoutChange
public void preLayoutChange (int stateId,
int constraintId)
called before layout happens
Parameters |
stateId |
int : -1 if state unknown, otherwise the state we will transition to |
constraintId |
int : the constraintSet id that we will transition to
|
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,["# ConstraintsChangedListener\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nConstraintsChangedListener\n==========================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The Constraint Layout support library has been superseded by the [AndroidX Constraint\n| Layout library](/reference/androidx/constraintlayout/classes), which is part of [Jetpack](/jetpack). The `ConstraintsChangedListener` class has been superseded by [`androidx.constraintlayout.widget.ConstraintsChangedListener`](/reference/androidx/constraintlayout/widget/ConstraintsChangedListener). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX.\n\n\n`\npublic\n\n\nabstract\nclass\nConstraintsChangedListener\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.constraint.ConstraintsChangedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n**Added in 2.0**\n\n\nCallbacks on state change\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[ConstraintsChangedListener](/reference/android/support/constraint/ConstraintsChangedListener#ConstraintsChangedListener())`() ` |\n\n| ### Public methods ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[postLayoutChange](/reference/android/support/constraint/ConstraintsChangedListener#postLayoutChange(int,%20int))`(int stateId, int constraintId) ` called after layout happens |\n| ` void` | ` `[preLayoutChange](/reference/android/support/constraint/ConstraintsChangedListener#preLayoutChange(int,%20int))`(int stateId, int constraintId) ` called before layout happens |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### ConstraintsChangedListener\n\n```\npublic ConstraintsChangedListener ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### postLayoutChange\n\n```\npublic void postLayoutChange (int stateId, \n int constraintId)\n```\n\ncalled after layout happens\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|----------------------------------------------------------------|\n| `stateId` | `int`: -1 if state unknown, otherwise the current state \u003cbr /\u003e |\n| `constraintId` | `int`: the current constraintSet id we transitioned to \u003cbr /\u003e |\n\n### preLayoutChange\n\n```\npublic void preLayoutChange (int stateId, \n int constraintId)\n```\n\ncalled before layout happens\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|------------------------------------------------------------------------------|\n| `stateId` | `int`: -1 if state unknown, otherwise the state we will transition to \u003cbr /\u003e |\n| `constraintId` | `int`: the constraintSet id that we will transition to \u003cbr /\u003e |"]]