Class ViewGroup
A ViewGroup
is a visual grouping of views in the navigation pane.
Signature
export class ViewGroup
Details
Constructors
Methods
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 2024-09-17 UTC.
[null,null,["Last updated 2024-09-17 UTC."],[[["`ViewGroup` organizes views visually within the navigation pane for better structure."],["It can contain labels, individual views, or even nested `ViewGroup` objects for hierarchical organization."],["Developers can easily add elements using methods like `addLabel`, `addView`, and `addViewGroup`."]]],["`ViewGroup` is a class for visually grouping views in a navigation pane. It can be constructed with a view or an ID. Key actions include adding a label via `addLabel`, adding a view using `addView` (accepting either a view object or `ViewId`), and nesting another `ViewGroup` within it using `addViewGroup`. It cannot be inherited as it is a final class.\n"]]