We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
层次结构不是很深。我认为最好的熟悉方法可能是从 View 开始然后查看顶部的“直接子类”和“间接子类”部分。
View
的主要划分是TextView
- 包括EditText
和Button
ViewGroup
- 只是关于每个容器在
ViewGroup
中,既有Layouts
也有更复杂的小部件,例如ListView
系列。即使您是新手,也可以尝试回答 Stackoverflow 上的一些问题。你必须学习各种否则你不会使用的课程。
一旦您开始编写代码并学会喜欢文档,您自然会获得类的思维导图。
The hierarchy is not very deep. I think the best way to get acquainted might be to start with View and then look at the "direct subclasses" and "indirect subclasses" section at the top.
The big divisions for
View
areTextView
- includingEditText
andButton
ViewGroup
- just about every containerWithin
ViewGroup
there are bothLayouts
and more complicated widgets like theListView
family.Try answering some questions on Stackoverflow, even if you are new. You'll have to learn all sorts of classes that you wouldn't have used otherwise.
Once you dive into writing code and learn to love the documentation, you'll naturally acquire a mental map of the classes.
在android studio中,你可以从
Navigate
>Type Hierarchy
看到整个android继承树。但由于android非常复杂,对于初学者来说,意义不大。In android studio, you can see the whole android inheritence tree from
Navigate
>Type Hierarchy
. But as android is very complex, for beginners, it won't make that much of a sense.仍在寻找同样的东西。层次结构的完整图表。
理想情况下,当输入类名或方法时,它会绘制一个具有完整继承的图表,但不幸的是我没有找到。
今天我发现了一些真正可以帮助我们每个人寻找这样的图表的东西:
http://landenlabs.com/android/classtree/classtree.html
而且,Ben 提供的链接不再有效,所以我发现此处的图表但仅显示完整的视图层次结构:
回程机器视图层次结构 PDF
希望它有所帮助。
Still looking for the same thing. A full diagram(s) of the hierarchy.
Ideally, when typing a class name or a method, it draws a diagram with the full inheritance but unfortunately i didn't find that.
Today i found something that can really help each of us that looking for such diagram:
http://landenlabs.com/android/classtree/classtree.html
And also, the link proided by Ben doesn't work anymore so i found the diagram here but it shows the full View hierarchy ony:
wayback machine view hierarchy PDF
Hope it helps.