Optandroiddocs background:
Accessing the Android API documentation has been a problem since Google was walled. Although the Android SDK can download the development documentation offline, it is still slow to access the online resource guides (js,fonts, etc.) that still link to Google in the document.
Project Address: Http://git.oschina.net/velable/OptAndroidDocs
So decided to use C + + to re-write an optimized Android offline document access speed of small programs. This project uses QT Creator Development (Linux under this very cool, very convenient). This project was passed in the Linux compilation test, in theory windows is also possible.
After compiling this project, Optandroiddocs will be generated and executed Optandroiddocs in the Android document directory.
[Email protected]:~/.my_files/usr/android_develop/sdk/docs$ time Optandroiddocsreal 0m14.163suser 0m11.227ssys 0 m1.180s
As you can see from the above data, it takes only 14 seconds to process hundreds of trillion of Android 5.0 offline documents (probably more than 9,000 HTML files).
In 1.assets/js/docs.js:
var po = document.createelement (' script '); Po.type = ' Text/javascript '; Po.async = true; PO.SRC = ' https://apis.google.com/js/plusone.js '; var s = document.getelementsbytagname (' script ') [0]; S.parentnode.insertbefore (PO, s);
Switch
var po = document.createelement (' script '); Po.type = ' Text/javascript '; Po.async = true; PO.SRC = ' https://apis.google.com/js/plusone.js '; var s = document.getelementsbytagname (' script ') [0]; S.parentnode.insertbefore (PO, s);
is to comment out the middle line.
In 2.reference/packages.html:
</div> <!--end Body-content--</body>
Switch
</div> <!--end Body-content--<script src= ". /jd_lists_unified.js?v=2 "type=" Text/javascript "></script> <script src=". /jd_extras.js?v=3 "type=" Text/javascript "></script> <script src=". /jd_collections.js?v=3 "type=" Text/javascript "></script> <script src=". /jd_tag_helpers.js?v=2 "type=" Text/javascript "></script></body>
This 2nd is more important, if you do not add these sentences (these sentences from the end of index.html in the document root) the search function of the document cannot be automatically complete (only the first two letters)
Speed up access to Android offline documents