当前位置: 网学 > 编程文档 > Android > 正文

Android学习笔记整理

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: myeducs.cn 发布时间: 13/03/17

【网学网提醒】:以下是网学会员为您推荐的Android学习笔记整理,希望本篇文章对您学习有所帮助。


    Android开发学习笔记
    小魏CQU
     Android开发学习笔记
    Android是Google于2007年11月05日宣布的基于Linux平台的开源手机操作系统的名称,该平台由操作系统、中间件、用户界面和应用软件组成。它采用软件堆层(SoftwareStack,又名软件叠层)的架构,主要分为三部分。底层以Linux内核工作为基础,由C语言开发,只提供基本功能;中间层包括函数库Library和虚拟机VirtualMachine,由C++开发。最上层是各种应用软件,包括通话程序,短信程序等,应用软件则由各公司自行开发,以Java作为编写程序的一部分。
    (android-wiki.net/index.php?title=Main_Page)进行Android开发,首先要搭建开发环境。实验室为我们搭建的环境:JAVAJDK1.5(C:\ProgramFiles\Java\jdk1.5.0_11)MyEclipse6.5ADT0.9.7(C:\android\ADT-0.9.7)AndroidSDK-windows1.6(C:\android\android-sdk-windows-1.6_r1)进行Android开发需要安装AndroidSDK.(使用AndroidSDKManager工具进行安装。实验室的电脑可以找到Manager的位置C:\android\android-sdk-windows-1.6_r1\SDKManager.exe)安装之后还应在IDE中进行一定的配置。(实验室MyEclipse6.5也帮我们都配置好了。可以打开MyEclipse->Windows->AndroidSDKandAVDManager查看)Android开发系统主要集中在两种环境中,分别是基于AndroidSDK的开发和基于Android源代码的开发。前者可以在Linux或者Windows两种环境中使用IDE完成,后者需要在Linux环境中进行开发。基于源代码Android的开发在获取所有源代码的基础上进行,可以开发Android应用程序,进行系统移植或者开发Android系统本身。
     Android开发学习笔记
    我们项目的开发主要还是机遇AndroidSDK进行上层软件的开发,但蓝牙通信部分可能需要基于源代码的开发。所以对SDK及源码结构有个总体的了解是很有好处的。AndroidSDK的目录结构如下
    androidContainstheresourceclassesusedbystandardAndroidapplications.
    android.accessibilityservice
    android.accounts
    android.app
    High-levelclassesencapsulatingtheoverallAndroidapplicationmodel.
    android.app.adminandroid.app.backup
    Containsthebackupandrestorefunctionalityavailabletoapplications.IfauserwipesthedataontheirdeviceorupgradestoanewAndroid-powereddevice,allapplicationsthathaveenabledbackupwillrestoretheuser'spreviousdata.
    android.appwidget
    Androidallowsapplicationstopublishviewstobeembeddedinotherapplications.Theseviewsarecalledwidgets,andarepublishedby"AppWidgetproviders."Thecomponentthatcancontainwidgetsiscalleda"AppWidgethost."
    Formoreinformation,seetheAppWidgetsdocumentationintheDevGuide.
    android.bluetooth
    ProvidesclassesthatmanageBluetoothfunctionality,suchasscanningfordevices,connecting
    withdevices,andmanagingdatatransferbetweendevices.
    android.content
    Containsclassesforaccessingandpublishingdataonthedevice.
    android.content.pm
    Containsclassesforaccessinginformationaboutanapplicationpackage,includinginformationaboutitsactivities,permissions,services,signatures,andproviders.
    android.content.res
    Containsclassesforaccessingapplicationresources,suchasrawassetfiles,colors,drawables,mediaorotherotherfilesinthepackage,plusimportantdeviceconfigurationdetails(orientation,inputtypes,etc.)thataffecthowtheapplicationmaybehave.
    android.databaseandroid.database.sqlite
    Containsclassestoexploredatareturnedthroughacontentprovider.ContainstheSQLitedatabasemanagementclassesthatanapplicationwouldusetomanageitsownprivatedatabase.
     Android开发学习笔记
    android.gestureandroid.graphicsProvidesclassestocreate,recognize,loadandsavegestures.Provideslowlevelgraphicstoolssuchascanvases,colorfilters,points,andrectanglesthatletyouhandledrawingtothescreendirectly.android.graphics.drawableProvidesclassestomanageavarietyofvisualelementsthatareintendedfordisplayonly,suchasbitmapsandgradients.android.graphics.drawable.shapesandroid.hardwareContainsclassesfordrawinggeometricshapes.ProvidessupportforhardwaredevicesthatmaynotbepresentoneveryAndroiddevice.android.inputmethodserviceandroid.locationBaseclassesforwritinginputmethods.
    ClassesdefiningAndroidlocation-basedandrelatedservices.
    android.mediaandroid.netandroid.net.httpandroid.net.wifiandroid.openglandroid.os
    Providesclassesthatmanagevariousmediainterfacesinaudioandvideo.Classesthathelpwithnetworkaccess,beyondthenormaljava.net.*APIs.
    ProvidesclassestomanageWi-Fifunctionalityonthedevice.ProvidesOpenGLutilities.Providesbasicoperatingsystemservices,messagepassing,andinter-processcommunicationonthedevice.
    android.preference
    ProvidesclassesthatmanageapplicationpreferencesandimplementthepreferencesUI.
    android.providerandroid.saxandroid.service.wallpaperandroid.speechandroid.speech.ttsandroid.telephony
    ProvidesconvenienceclassestoaccessthecontentproviderssuppliedbyAndroid.AframeworkthatmakesiteasytowriteefficientandrobustSAXhandlers.
    ProvidesAPIsformonitoringthebasicphoneinformation,suchasthenetworktypeandconnectionstate,plusutilitiesformanipulatingphonenumberstrings.
    android.telephony.cdmaandroid.telephony.gsm
    ProvidesAPIsforutilizingCDMA-specifictelephonyfeatures.ProvidesAPIsforutilizingGSM-specifictelephonyfeatures,suchastext/data/PDUSMSmessages.
    android.test
    AframeworkforwritingAndroidtestcasesandsuites.
     Android开发学习笔记
    android.test.mockandroid.test.suitebuilderandroid.textUtilityclassesprovidingstubsormocksofvariousAndroidframeworkbuildingblo
    cks.Utilityclassessupportingthetestrunnerclasses.
    Providesclassesusedtorenderortracktextandtextspansonthescreen.
    android.text.formatandroid.text.method
    Providesclassesthatmonitorormodifykeypadinput.
    android.text.style
    ProvidesclassesusedtovieworchangethestyleofaspanoftextinaViewobject.
    android.text.util
    UtilitiesforconvertingidentifiabletextstringsintoclickablelinksandcreatingRFC822-typemessage(SMTP)tokens.
    android.util
    Providescommonutilitymethodssuchasdate/timemanipulation,base64encodersanddecoders,stringandnumberconversionmethods,andXMLutilities.
    android.view
    Providesclassesthatexposebasicuserinterfaceclassesthathandlescreenlayoutandinteractionwiththeuser.
    android.view.accessibilityandroid.view.animation
    Providesclassesthathandletweenedanimations.
    android.view.inputmethod
    Frameworkclassesforinteractionbetweenviewsandinputmethods(suchassoftkeyboards).
    android.webkitandroid.widget
    Providestoolsforbrowsingtheweb.Thewidgetpackagecontains(mostlyvisual)UIelementstouseonyourApplicationscreen.
    dalvik.bytecode
    ProvidesclassessurroundingtheDalvikbytecode.
    dalvik.system
    ProvidesutilityandsysteminformationclassesspecifictotheDalvikVM.
    java.awt.fontjava.beansjava.io
    Providesinputandoutputfacilitiesbymeansofstreaming,filesystemaccessandserialization.
    java.lang
    ProvidescoreclassesoftheAndroidenvironment.
     Android开发学习笔记
    java.lang.annotationDefinesinterfacesandexceptionsnecessaryforannotationsupport.
    java.lang.refjava.lang.reflectjava.mathjava.netProvidesarbitrary-precisionintegersanddecimals.
    Providesnetworking-relatedfunctionality,suchasstreaminganddatagramsockets,handlingofInternetaddresses,anddealingwithHTTPrequests.
    java.nio
    Providesbuffersthathelphandlingdata.
    java.nio.channels
    Channelsprovideawaytoconnecttosourcesofdatasuchasfiles,socketsorotherstructuresthatallowinputand/oroutputofdata.
    java.nio.channels.spi
    Service-providerclassesforniochannels.
    java.nio.charset
    Thispackageprovidestranslationservicesbetweenbytesanddifferentcharactersets.
    java.nio.charset.spi
    Service-providerclassforniocharset.
    java.security
    ThispackageprovidesalltheclassesandinterfacesthatconstitutetheJavasecurityframework.
    java.security.acl
    ThispackageprovidestheclassesandtheinterfacesneededtobuildAccessControlLists.
    java.security.cert
    Thispackageprovidesalltheclassesandalltheinterfacesneededtogenerate,administerandverifyX.509certificates.
    java.security.interfaces
    Thispackageprovidestheinterfacesneededtogenerate:(1)KeysfortheRSAasymmetricencryptionalgorithmusingthePKCS#1standard;(2)KeysfortheDigitalSignatureAlgorithm(DSA)specifiedbyFIPS-186;(3)KeysforagenericEllipticCurveasymmetricencryptionalgorithm
    .
    java.security.spec
    Thispackageprovidestheclassesandinterfacesneededtospecifykeysandparametersforencryptionandsigningalgorithms.
     Android开发学习笔记
    java.sqlProvidesacompatibilityinterfaceforaccessingSQL-baseddatabases.
    java.text
    Thejava.textpackageallowstouncouplethetextinanapplicationfromnaturallanguages.
    java.util
    Providesanextensivesetofutilityclasses.
    java.util.concurrentjava.util.concurrent.atomic
    Utilityclassescommonlyusefulinconcurrentprogramming.Asmalltoolkitofclassesthatsupportlock-freethread-safeprogrammingonsinglevariables.
    java.util.concurrent.locks
    Interfacesandclassesprovidingaframeworkforlockingandwaitingforconditionsthatisdistinctfrombuilt-insynchronizationandmonitors.
    java.util.jar
    Thejava.jarpackagegivesaccesstoreadingandwritingaJavaarchive,orJAR,files.
    java.util.logging
    Thispackageallowstoaddloggingtoanyapplication.
    java.util.prefs
    Thispackageprovidesapreferencesmechanism,thatis,ameansofwritingconfigurationdata(key/valuepairs)toapersistentdatastoreandretrievingitfromthere.
    java.util.regex
    Providesanimplementationofregularexpressions,whichisusefulformatching,searching,andreplacingstringsbasedonpatterns.
    java.util.zip
    ThispackagecontainsclassesforcompressinganddecompressingdatainZIPandGZIPfileformats.
    javax.crypto
    Thispackageprovidestheclassesandinterfacesforcryptographicapplicationsimplementingalgorithmsforencryption,decryption,orkeyagreement.
    javax.crypto.interfaces
    ThispackageprovidestheinterfacesneededtoimplementtheDiffie-Hellman(DH)keyagreement'salgorithmasspecifiedbyPKCS#3.
    javax.crypto.spec
    Thispackageprovidestheclassesandinterfacesneededtospecifykeysandparameterforencryption.
    javax.microedition.khronos.egljavax.microedition.khronos.opengles
     Android开发学习笔记
    javax.netThispackageprovidesfactoryclassestocreatesocketsandserver-sockets.
    javax.net.ssl
    ThispackageprovidesalltheclassesandinterfacesneededtoimplemenetandprogramtheSecureSocketabstractionbasedontheSSLprotocolSSSLv3.0orTLSv1.2.
    javax.security.auth
    Thispackageprovidestheclassesandinterfacesneededtoimplemenetandprogramdifferentmethodsofusers'authentificationandrolebasedusers'authorization.
    javax.security.auth.callback
    Thispackageprovidesclassesandinterfacesneededtointeractwiththeapplicationinordertoexecutetheauthentificationandauthorizationprocesses.
    javax.security.auth.login
    ThispackageprovidesapluggableandstackableauthenticationsystembasedonideasandconceptsfromtheUnix-PAMmodule.
    javax.security.auth.x500
    ThispackageprovidesclassesneededtostoreX.500principalsandtheircredentials.
    javax.security.cert
    Thispackageisprovidedonlyforcompatibilityreasons.
    javax.sql
    Providesextensionstothestandar
    dinterfaceforaccessingSQL-baseddatabases.
    javax.xml
    ProvidesautilityclasswithusefulXMLconstants.
    javax.xml.datatype
    XML/JavaTypeMappings.
    javax.xml.namespace
    XMLNamespaceprocessing.
    javax.xml.parsersjavax.xml.transform
    ProvidesclassesallowingtheprocessingofXMLdocuments.
    ThispackagedefinesthegenericAPIsforprocessingtransformationinstructions,andperformingatransformationfromsourcetoresult.
    javax.xml.transform.dom
    ThispackageimplementsDOM-specifictransformationAPIs.
    javax.xml.transform.sax
    ThispackageimplementsSAX2-specifictransformationAPIs.
    javax.xml.transform.stream
    Thispackageimplementsstream-andURI-specifictransformationAPIs.
    javax.xml.validation
    ThispackageprovidesanAPIforvalidationofXMLdocuments.
     Android开发学习笔记
    javax.xml.xpathThispackageprovidesanobject-modelneutralAPIfortheevaluationofXPathexpressionsandaccesstotheevaluationenvironment.
    junit.frameworkjunit.runnerorg.apache.httporg.apache.http.auth
    Thejunittestframework.Utilityclassessupportingthejunittestframework.ThecoreinterfacesandclassesoftheHTTPcomponents.TheAPIforclient-sideHTTPauthenticationagainstaserver,commonlyreferredtoasHttpAuth.
    org.apache.http.auth.paramsorg.apache.http.clientorg.apache.http.client.entityorg.apache.http.client.methodsorg.apache.http.client.paramsorg.apache.http.client.protocolorg.apache.http.client.utilsorg.apache.http.conn
    ParametersforconfiguringHttpAuth.TheAPIforclient-sideHTTPcommunicationandentrypointtotheHttpClientmodule.
    RequestimplementationsforthevariousHTTPmethodslikeGETandPOST.ParametersforconfiguringHttpClient.Additionalrequestandresponseinterceptors.HelpersandutilityclassesforHttpClient.Theclient-sideconnectionmanagementandhandlingAPIattheheartofwhatisreferredtoasHttpConn.
    org.apache.http.conn.paramsorg.apache.http.conn.routingorg.apache.http.conn.schemeorg.apache.http.conn.sslorg.apache.http.conn.utilorg.apache.http.cookie
    ParametersforconfiguringHttpConn.Theclient-siderouterepresentationandtrackingAPI,partofHttpConn.
    TLS/SSLspecificpartsoftheHttpConnAPI.
    TheAPIforclient-sidestatemanagementviacookies,commonlyreferredtoasHttpCookie.
    org.apache.http.cookie.paramsorg.apache.http.entityorg.apache.http.implorg.apache.http.impl.authorg.apache.http.impl.clientorg.apache.http.impl.conn
    ParametersforconfiguringHttpCookie.RepresentationsforHTTPmessageentities.
    Defaultimplementationsforinterfacesin
    org.apache.http.
     Android开发学习笔记
    org.apache.http.impl.conn.tsccmorg.apache.http.impl.cookieorg.apache.http.impl.entityDefaultimplementationsforinterfacesinTheimplementationofathread-safeclientconnectionmanager.
    org.apache.http.entity.
    org.apache.http.impl.ioorg.apache.http.ioorg.apache.http.messageorg.apache.http.paramsorg.apache.http.protocolorg.a
    pache.http.utilorg.jsonorg.w3c.domDefaultimplementationsforinterfacesin
    org.apache.http.io.
    ThetransportlayerabstractionoftheHTTPcomponents.
    AselectionofHTTP
    messageimplementations.
    TheparameterizationframeworkforHTTPcomponents.HTTPprotocolexecutionframework.Mostlyutilityclasseswithstatichelpermethodsforvariouspurposes.
    ProvidestheofficialW3CJavabindingsfortheDocumentObjectModel,level2core.
    org.w3c.dom.lsorg.xml.sax
    ThispackageprovidesthecoreSAXAPIs.
    org.xml.sax.ext
    ThispackagecontainsinterfacestoSAX2facilitiesthatconformantSAXdriverswon'tnecessarilysupport.
    org.xml.sax.helpers
    Thispackagecontains"helper"classes,includingsupportforbootstrappingSAX-basedapplications.
    org.xmlpull.v1org.xmlpull.v1.sax2
    我们可以浏览Android网站C:\android\android-sdk-windows-1.6_r1\docs\reference\packages.html使用Ctrl+F查找想要使用的关键字,会看到相应的简介如查找“Bluetooth.”可以看到与蓝牙开发相关的API
    package
    android.bluetooth
    Classes|DescriptionProvidesclassesthatmanageBluetoothfunctionality,suchasscanningfordevices,connectingwithdevices,andmanagingdatatransferbetweendevices.
     Android开发学习笔记
    Classes
    BluetoothAdapterRepresentsthelocaldeviceBluetoothadapter.
    BluetoothClass
    RepresentsaBluetoothclass,whichdescribesgeneralcharacteristicsandcapabilitiesofadevice.
    BluetoothClass.Device
    Definesalldeviceclassconstants.
    BluetoothClass.Device.Major
    Definesallmajordeviceclassconstants.
    BluetoothClass.Service
    Definesallserviceclassconstants.
    BluetoothDevice
    RepresentsaremoteBluetoothdevice.
    BluetoothServerSocket
    AlisteningBluetoothsocket.
    BluetoothSocket
    AconnectedorconnectingBluetoothsocket.
    中文如下:Android.bluetooth提供了皆如扫描设备、连接设备以及对设备间的数据传输进行管理的类,这些类对蓝牙设备进行功能性管理。蓝牙模块API提供的应用包括了:●扫描其它蓝牙设备●通过查询本地蓝牙适配器来匹配蓝牙设备●建立RFCOMM(无线射频通信协议)的通道/端口●从其他的蓝牙设备中连接到指定的端口●传输数据到其他设备,或者从其他设备中接收数据如需运用这些API来执行蓝牙通信,应用程序必须声明BLUETOOTH许可。对于皆如寻找设备请求等的一些附加功能,也同样需要BLUETOOTH_ADMIN许可。如需要使用蓝牙API的更详细的指引,参看BluetoothDevGuidetopic.ClassesBluetoothAdapter代表本地的蓝牙适配器设备BluetoothClass代表一个描述了设备通用特性和功能的蓝牙类BluetoothClass.Device定义了所有设备类的常量BluetoothClass.Device.Major定义了所有主要设备类的常量BluetoothClass.Service定义了所有服务类的常量BluetoothDevice代表一个远程的蓝牙设备
     Android开发学习
    笔记
    BluetoothServerSocket监听蓝牙服务的端口BluetoothSocket一个双向连接的蓝牙端口网上有很多热心AndroidAPI翻译的Android爱好者。目前已经如下部分
    虽然是合作翻译,但翻译的很不错,而且每个章节都有相关的资料推荐!
    实验室的电脑貌似没有安装源代码。在android.git.kernel.org/可以下载源码的目录结构大致如下源码目录结构详解Android2.1|--Makefile|--bionic很难读|--bootable|--build及脚本|--cts|--dalvik|--development|--external|--frameworks|--hardware|--out|--packages|--prebuilt|--sdk|--system`--vendor
    (bionicC库)包括一些Linux内核及汇编语言编译的头文件。。。(启动引导相关代码)一些驱动库还有工具镜像。。。也很难读(存放系统编译规则及generic等基础开发包配置)有一些编译工具(Android兼容性测试套件标准)(dalvikJAVA虚拟机)(应用程序开发相关)(android使用的一些开源的模组)(核心框架——java及C++语言)(部分厂家开源的硬解适配层HAL代码)(编译完成后的代码输出与此目录)(应用程序包)(x86和arm架构下预编译的一些资源)(sdk及模拟器)(底层文件系统库、应用及组件——C语言)(厂商定制代码)
    比较重要的两个目录development及external入下
     Android开发学习笔记
    development目录|--apps||--BluetoothDebug||--CustomLocale||--Development||--Fallback||--FontLab||--GestureBuilder||--NinePatchLab||--OBJViewer||--SdkSetup||--SpareParts||--Term|`--launchperf|--build|--cmds|--data|--docs|--host|--ide|--ndk|--pdk|--samples||--AliasActivity||--ApiDemos||--BluetoothChat||--BrowserPlugin||--BusinessCard||--Compass||--ContactManager||--CubeLiveWallpaper||--FixedGridLayout||--GlobalTime||--HelloActivity||--Home||--JetBoy||--LunarLander||--MailSync||--MultiResolution||--MySampleRss||--NotePad||--RSSReader||--SearchableDictionary||--SimpleJNI(开发者需要的一些例程及工具)(一些核心应用程序)(蓝牙调试程序)(自定义区域设置)(开发)(和语言相关的一个程序)(字库)(手势动作)(?)(OBJ查看器)(SDK安装器)(高级设置)(远程登录)(?)(编译脚本模板)(有个monkey工具)(配置数据)(文档)(主机端USB驱动等)(集成开发环境)(本地开发套件——c语言开发套件)(PlugDevelopmentKit)(例程)(?)(API演示程序)(蓝牙聊天)(浏览器插件)(商业卡)(指南针)(联系人管理器)(动态壁纸的一个简单例程)(像是布局)(全球时间)(Hello)(Home)(jetBoy游戏)(貌似又是一
    个游戏)(邮件同步)(多分辨率)(RSS)(记事本)(RSS阅读器)(目录搜索)(JNI例程)
     Android开发学习笔记
    ||--SkeletonApp||--Snake||--SoftKeyboard||--Wiktionary(空壳APP)(snake程序)(软键盘)(?维基)(脚本)(sdk配置)(?模拟器)(?测试用)(一些工具)
    |`--WiktionarySimple(?维基例程)|--scripts|--sdk|--simulator|--testrunner`--tools
    external目录.|--aes|--apache-http|--astl|--bison|--blktrace|--bluetooth|--bsdiff|--bzip2|--clearsilver|--dbus|--dhcpcd|--dosfstools|--dropbear|--e2fsprogs|--elfcopy|--elfutils|--embunit|--emma|--esd|--expat|--fdlibm|--freetype|--fsck_msdos|--gdata|--genext2fs|--giflib|--googleclient|--grub|--gtest|--icu4c|--ipsec-tools(AES加密)(网页服务器)(ASTL(AndroidSTL)isaslimmed-downversionoftheregularC++STL.)(自动生成语法分析器,将无关文法转换成C、C++)(blktraceisablocklayerIOtracingmechanism)(蓝牙相关、协议栈)(diff工具)(压缩工具)(html模板系统)(低延时、低开销、高可用性的IPC机制)(DHCP服务)(DOS文件系统工具)(SSH2的server)(EXT2文件系统工具)(复制ELF的工具)(ELF工具)(EmbeddedUnitProject)(java代码覆盖率统计工具)(EnlightenedSoundDaemon,将多种音频流混合在一个设备上播放)(Expatisastream-orientedXMLparser.)(FDLIBM(FreelyDistributableLIBM))(字体)(dos文件系统检查工具)(google的无线数据相关)(genext2fsgeneratesanext2filesystemasanormal(non-root)user)(gif库)(google用户库)(ThisisGNUGRUB,theGRandUnifiedBootloader.)(GoogleC++TestingFramework)(ICU(InternationalComponentforUnicode)在C/C++下的版本)(ThispackageprovidesawaytousethenativeIPsecfunctionality)
     Android开发学习笔记
    |--iptables|--jdiff|--jhead|--jpeg|--junit|--kernel-headers|--libffi|--libpcap|--libpng|--libxml2|--mtpd|--netcat|--netperf|--neven|--opencore|--openssl|--openvpn|--oprofile|--ping|--ppp|--proguard|--protobuf|--qemu|--safe-iop|--skia|--sonivox|--speex|--sqlite|--srec|--strace|--svox|--tagsoup|--tcpdump|--tesseract|--tinyxml|--tremor|--webkit|--wpa_supplicant|--xmlwriter|--yaffs2`--zlib(防火墙)(generateareportdescribingthedifferencebetweentwopublicJavaAPIs.)(jpeg头部信息工具)(jpeg库)(JUnit是一个Java语言的单元测试框架)(内核的一些头文件)(libffiisaforeignfunctioninterfacelibrary.)(网络数据包捕获函数)(png库)(xml解析库)(一个命令)(simpleUnixutilitywhichreadsandwritesdataacrossnetworkconne
    ctions)(网络性能测量工具)(看代码和JNI相关)(多媒体框架)(SSL加密相关)(VPN开源库)(OProfile是Linux内核支持的一种性能分析机制。)(ping命令)(pppd拨号命令,好像还没有chat)(Javaclassfileshrinker,optimizer,obfuscator,andpreverifier)(aflexible,efficient,automatedmechanismforserializingstructureddata)(arm模拟器)(functionsforperformingsafeintegeroperations)(skia图形引擎)(soleMIDIsolutionforGoogleAndroidMobilePhonePlatform)(Speex编/解码API的使用(libspeex))(数据库)(Nuance公司提供的开源连续非特定人语音识别)(trace工具)(EmbeddedText-to-Speech)(TagSoup是一个Java开发符合SAX的HTML解析器)(抓TCP包的软件)(TesseractOpenSourceOCREngine.)(TinyXmlisasimple,small,C++XMLparser)(Istreamandfiledecoderprovidesanembeddable,integer-onlylibrary)(浏览器核心)(无线网卡管理)(XML编辑工具)(yaffs文件系统)(ageneralpurposedatacompressionlibrary)
     Android开发学习笔记
    更多详细的源码目录结构参见wenku.baidu/view/00101d2f0066f5335a8121cd.html源码中掺杂了汇编、C、C++、Java语言,阅读还是有些吃力的,但一些程序实例基本都是Java的,且有详尽的注释,建议阅读。(安装SDK就有Samples.实验室的电脑C:\android\android-sdk-windows-1.6_r1\platforms\android-1.6\samples目录下可以找到。与源码中development\samples下基本相同)如运行贪食蛇的源码:在MyEclipse中选择File->New->AndroidProject.选择打开已存在的资源如下:
    就可以将工程加载到IDE中,再通过Runas->AndroidProject可以在模拟器中运行工程。Snake工程结构如下:
     Android开发学习笔记
    Src下的java文件是我们主要要写的。Gen下的R.java负责调用应用程序中的非代码资源,是ADT自动生成的,我们不用修改。Res主要存放资源文件(例如图片等)里面有个layout文件夹下有snake_layout.xml文件是用来编写页面布局。(Xml文件格式还是挺好读的,但注意的是标签的声明。)通过编写修改xml文件修改布局有点像写网页。我们可以通过GUI设计器可视化设计器DroidDraw来进行页面设计。(但这个可能要自己下载,我还没有试。。。)AndroidManifest.xml是每个应用程序的根目录都会有的文件。它主要向Android操作系统描述程序所包括的组件,所实现的功能,能处理的数据,要请求的资源等等。类似web程序开发中的web.xml
    除了贪食蛇,还有很多示例的demo.具体列表见C:\android\android-sdk-windows-1.6_r1\docs\resources\samples\index.html读Snake的源码。一开始就会看到Activity\View等。。。Activity
    是Android很重要的内置对象。可以理解成C#中的Form.而View的概念也很重要。我也解释不清楚,具体可见android.yaohuiji/archives/196android-wiki.net/index.php?title=%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F
    Android中除了内置对象Activity,还有Intents、Services以及ContentProviders四个组件。这是Android应用程序最重要的四个组件。(其他三个因为我还没有读到,具体也不太清楚。这里有些参考资料1225682794.javaeye/blog/776761)
    
    
  • 上一篇资讯: Android学习系列
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号