Method ViewGroup.addView
Stay organized with collections
Save and categorize content based on your preferences.
Add a view to the ViewGroup
. The view can be represented by a view-derived
object, or simply by ViewId
.
Signature
addView(viewOrId: DocsView|ViewId): ViewGroup;
Details
Optional |
No |
Final |
No |
Protected |
No |
Static |
No |
Parameters
Returns
ViewGroup
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-20 UTC.
[null,null,["Last updated 2025-06-20 UTC."],[],[],null,["# Method ViewGroup.addView\n\nAdd a view to the `ViewGroup`. The view can be represented by a view-derived\nobject, or simply by `ViewId`.\n\nSignature\n---------\n\n addView(viewOrId: DocsView|ViewId): ViewGroup;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|------------|--------------------------------------------------------------|----------|-------------|\n| `viewOrId` | [DocsView](./picker.docsview.md)`|`[ViewId](./picker.viewid) | No | |\n\nReturns\n-------\n\n[ViewGroup](./picker.viewgroup)"]]