Klasa ViewGroup
ViewGroup
to wizualne grupowanie widoków w panelu nawigacji.
Podpis
export class ViewGroup
Szczegóły
Zespoły
Metody
Nazwa |
Opis |
addLabel(label) |
Dodaj etykietę do tego ViewGroup . |
addView(viewOrId) |
Dodaj widok do ViewGroup . Widok może być reprezentowany przez obiekt utworzony na podstawie widoku lub po prostu przez ViewId . |
addViewGroup(viewGroup) |
Umieść element ViewGroup w bieżącym elemencie ViewGroup . |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-11-08 UTC.
[null,null,["Ostatnia aktualizacja: 2024-11-08 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"]]