如何离线阅读Google SDK帮助文档

做Android开发免不了要阅读Google SDK中的文档。但往往会出现文档打开缓慢,格式错乱、图片确实等问题,给阅读带来很大的不便。通过摸索总结出如下离线阅读Google文档的方法,打开速度飞快,而且排版不会错乱。

平台: Windows、mac、Linux都可以。

涉及的软件:

1、Firefox(其它带有脱机功能的浏览器也可以,不过Firefox对Google文档的支持相当好)

2、Python , Linux平台一般自带Python,Windows平台需要安装ActivePython软件。

3、脚本micro-httpd.py,该脚本可以搭建一个简单的httpd服务器。该脚本可以在Android源码中找到。源码如下:


</pre><pre name="code" class="python">
import SimpleHTTPServer
import SocketServer
import os


outdir = os.environ.get('OUTDIR', os.path.join(os.path.dirname(__file__), '..', 'docs'))
os.chdir(outdir)
PORT = int(os.environ.get('HTTP_PORT', 8080))
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(('0.0.0.0', PORT), Handler)
httpd.allow_reuse_address = True
print 'Serving on port %d' % PORT
httpd.serve_forever()

1、将该脚本放置到sdk/docs目录下。



2、执行脚本micro-https.py. (如果是Windows,请在命令行中执行 python micro-https.py)


3、打开Firefox,从菜单“文件”中选择“脱机工作”



4、在地址栏中输入“127.0.0.1:8080”,即可。




  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
IIntroducingAndroid 19 1QuickStart 20 1.1InstallingtheTools .....................20 1.2CreatingYourFirstProgram ................24 1.3RunningontheEmulator .................24 1.4RunningonaRealPhone .................29 1.5Fast-Forward>> .......................29 2KeyConcepts 30 2.1TheBigPicture .......................30 2.2ItsAlive ...........................35 2.3BuildingBlocks .......................39 2.4UsingResources .......................40 2.5SafeandSecure .......................41 2.6Fast-Forward>> .......................42 IIAndroidBasics 43 3DesigningtheUserInterface 44 3.1IntroducingtheSudokuExample .............44 3.2DesigningbyDeclaration ..................45 3.3CreatingtheOpeningScreen ...............46 3.4UsingAlternateResources .................54 3.5ImplementinganAboutBox ................58 3.6ApplyingaTheme ......................62 3.7AddingaMenu .......................63 3.8AddingSettings .......................66 3.9StartingaNewGame ....................68 3.10DebuggingwithLogMessages ...............70 3.11DebuggingwiththeDebugger ...............71 3.12ExitingtheGame ......................71 3.13Fast-Forward>> .......................72 4Exploring2DGraphics 73 4.1LearningtheBasics .....................73 4.2AddingGraphicstoSudoku ................78 4.3HandlingInput .......................87 4.4TheRestoftheStory ....................93 4.5MakingMoreImprovements ................102 4.6Fast-Forward>> .......................103 5Multimedia 104 5.1PlayingAudio ........................104 5.2PlayingVideo .........................110 5.3AddingSoundstoSudoku .................115 5.4Fast-Forward>> .......................118 6StoringLocalData 119 6.1AddingOptionstoSudoku .................119 6.2ContinuinganOldGame ..................121 6.3RememberingtheCurrentPosition ............123 6.4AccessingtheInternalFileSystem ............125 6.5AccessingSDCards .....................126 6.6Fast-Forward>> .......................127 IIIBeyondtheBasics 128 7TheConnectedWorld 129 7.1BrowsingbyIntent .....................130 7.2WebwithaView .......................134 7.3FromJavaScripttoJavaandBack ............139 7.4UsingWebServices .....................146 7.5Fast-Forward>> .......................156 8LocatingandSensing 158 8.1Location,Location,Location ................158 8.2SetSensorstoMaximum ..................164 8.3Birds-EyeVie .......................168 8.4Fast-Forward>> .......................173 9PuttingSQLtoWork 175 9.1IntroducingSQLite .....................175 9.2SQL101 ...........................176 9.3Hello,Database .......................178 9.4DataBinding .........................186 9.5UsingaContentProvider ..................189 9.6ImplementingaContentProvider .............192 9.7Fast-Forward>> .......................193 103DGraphicsinOpenGL 195 10.1Understanding3DGraphics ................195 10.2IntroducingOpenGL ....................196 10.3BuildinganOpenGLProgram ...............197 10.4ManagingThreads .....................199 10.5BuildingaModel ......................205 10.6Lights,Camera,.........................208 10.7Action! ............................210 10.8ApplyingTexture ......................213 10.9Peekaboo ...........................216 10.10Fast-Forward>> .......................217 IVAppendixes 218 AJavavs.theAndroidLanguageandAPIs 219 A.1LanguageSubset ......................219 A.2StandardLibrarySubset ..................221 A.3Third-PartyLibraries ....................222 BHello,Widget 223 B.1CreatingYourFirstWidget .................223 B.2CallingAllWidgets! .....................225 B.3StretchtoFit .........................226 B.4TheRestoftheStory ....................227 B.5RunningtheWidget .....................228 B.6KeepingUptoDate .....................228 B.7GoWild ............................231 CPublishingtotheAndroidMarket 233 DBibliography 234

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值