取得电池电量.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
取得电池电量.ppt

AndroidManifest.xml---分解2 uses-sdk /*uses-sdk 元素允许配置我们的应用*/ android:minSdkVersion=8 /*指明该应用程序可以运行的API最低版本。默认是“1”。*/ android:targetSdkVersion=15 / /*指明该应用程序设计时期望运行的目标API版本。这允许应用程序使用目标API级别下定义的清单元素或行为,而不是只限于使用最低API级别定义的内容。*/ application /*一个AndroidManifest.xml中必须含有一个Application标签,这个标签声明了每一个应用程序的组件及其属性(如icon,label,permission等)*/ AndroidManifest.xml---分解3 android:icon=@drawable/ic_launcher /*声明整个APP图标,图片一般都放在drawable文件夹*/ android:label=@string/app_name /*标签@string/app_name就是从string这个文件中引用叫app_name的这个键值对的值,作用是为当前ViewGroup设置一个标签*/ android:theme=@style/AppTheme /*是一个资源的风格,它定义了一个默认的主题风格给所有的activity,当然也可以在自己的theme里面去设置它,有点类似style。*/ AndroidManifest.xml---分解4 activity android:name=.GravityActivity /*为应用程序所实现的Application子类的全名。当应用程序进程开始时,该类在所有应用程序组件之前被实例化。*/ android:label=@string/title_activity_gravity intent-filter action android:name=ent.action.MAIN / category android:name=ent.category.LAUNCHER / /intent-filter /*Intent filter内会设定的资料包括action,data与category三种。action很简单,只有android:name这个属性。常见的android:name值为ent.action.MAIN,表明此activity是作为应用程序的入口。*/ layout布局文件(XML)代码 RelativeLayout xmlns:android=/apk/res/android xmlns:tools=/tools android:layout_width=match_parent android:layout_height=match_parent TextView android:id=@+id/textView1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginBottom=17dp android:layout_marginLeft=83dp android:text=X= / TextView android:id=@+id/textView2 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignLeft=@+id/textView1 android:layout_below=@+id/textView1 android:text=Y= / TextView android:id=@+id/textView3 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignRight=@+id/textView2 android:layout_below=@+id/textView2 android:layout_marginTop=18dp android:tex

文档评论(0)

此项为空 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档