Is it possible to see the code on how the APIs in Android work?
Say, I want to see the implementation of method setContentView() or setStroke().
I am wondering if the implementation of these APIs are exposed.
- 9,898
- 13
- 71
- 100
4 Answers
Android is open source. You can find all the code from here: http://source.android.com/
- 42,982
- 7
- 68
- 84
If you use a Chrome-flavored browser, you can install the Android SDK Search extension, which:
Adds an
adsearch to the "omnibox" (a.k.a., address/search bar in Chrome), soad AdapterViewwould take you right to theAdapterViewdocumentationAdds a "(view source)" link to the JavaDocs for each class that brings up the source code to that class
- 986,068
- 189
- 2,389
- 2,491
-
This is perfect and works flawless. Thanks :) – Green goblin Apr 28 '14 at 09:39
At this site you can find and browse the source code for all Android versions: http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/
- 12,992
- 3
- 32
- 38
This has already been answered here: https://stackoverflow.com/a/19416821/977090
Basically, just install "Sources for Android SDK" from Android SDK Manager.