带注释的 Android 类层次结构

发布于 2024-10-20 21:09:44 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

内心旳酸楚 2024-10-27 21:09:44

层次结构不是很深。我认为最好的熟悉方法可能是从 View 开始然后查看顶部的“直接子类”和“间接子类”部分。

View 的主要划分是

  • TextView - 包括 EditTextButton
  • 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 are

  • TextView - including EditText and Button
  • ViewGroup - just about every container

Within ViewGroup there are both Layouts and more complicated widgets like the ListView 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.

眉黛浅 2024-10-27 21:09:44

在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.

墨离汐 2024-10-27 21:09:44

仍在寻找同样的东西。层次结构的完整图表。
理想情况下,当输入类名或方法时,它会绘制一个具有完整继承的图表,但不幸的是我没有找到。

今天我发现了一些真正可以帮助我们每个人寻找这样的图表的东西:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文