Stay organized with collections
Save and categorize content based on your preferences.
OnInflateListener
interface OnInflateListener
Listener used to receive a notification after a ViewStub has successfully inflated its layout resource.
Summary
Public methods |
abstract Unit |
Invoked after a ViewStub successfully inflated its layout resource.
|
Public methods
onInflate
abstract fun onInflate(
stub: ViewStub!,
inflated: View!
): Unit
Invoked after a ViewStub successfully inflated its layout resource. This method is invoked after the inflated view was added to the hierarchy but before the layout pass.
Parameters |
stub |
ViewStub!: The ViewStub that initiated the inflation. |
inflated |
View!: The inflated View. |
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,["# ViewStub.OnInflateListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnInflateListener\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/ViewStub.OnInflateListener \"View this page in Java\") \n\n```\ninterface OnInflateListener\n```\n\n|----------------------------------------------|\n| [android.view.ViewStub.OnInflateListener](#) |\n\nListener used to receive a notification after a ViewStub has successfully inflated its layout resource.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onInflate](#onInflate(android.view.ViewStub,%20android.view.View))`(`stub:` `[ViewStub](/reference/kotlin/android/view/ViewStub)!`, `inflated:` `[View](/reference/kotlin/android/view/View)!`)` Invoked after a ViewStub successfully inflated its layout resource. |\n\nPublic methods\n--------------\n\n### onInflate\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onInflate(\n stub: ViewStub!, \n inflated: View!\n): Unit\n```\n\nInvoked after a ViewStub successfully inflated its layout resource. This method is invoked after the inflated view was added to the hierarchy but before the layout pass.\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------|\n| `stub` | [ViewStub](/reference/kotlin/android/view/ViewStub)!: The ViewStub that initiated the inflation. |\n| `inflated` | [View](/reference/kotlin/android/view/View)!: The inflated View. |"]]