For the life of me, I can't see the "big picture". Every time I think I learned something about Android, a new class pops up in some sample/example code.
True, I can look it up in the (terse) formal reference, but I need something additional: A class hierarchy map, that can remind me of the various relationships between the classes. Something like this.
Ideally, I would be able to print it on paper so that it's always in front of my eyes while learning Android.
Is there such a diagram somewhere?
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 containerWithin 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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With