gpt4 book ai didi

android - 什么是 View 层次结构?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:52:33 25 4
gpt4 key购买 nike

我是学android的,当然是新手,老是看view hierarchy之类的,请问这到底是什么意思呢?什么是 View 层次结构?例如

// fragment's containing frame doesn't exist. The fragment // may still be created from its saved state, but there is // no reason to try to create its view hierarchy because it // won't be displayed. Note this is not needed -- we could // just run the code below, where we would create and return // the view hierarchy; it would just never be used.

http://developer.android.com/reference/android/app/Fragment.html

最佳答案

View 在另一个 View 中创建一个层次结构,外部 View 成为内部 View 的父 View ,内部 View 是其 subview 。它只是嵌套 View 。

这是一个例子:

enter image description here

关于android - 什么是 View 层次结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18004148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com