App Fundamentals摘要

翻译 2015年11月18日 15:10:50

App Components

Activities,Services,Content providers,Broadcast receivers


Activities, services, and content providers that you include in your source but do not declarein the manifest are not visible to the system and, consequently, can never run. However,broadcastreceivers can be either declared in the manifest or created dynamically in code (asBroadcastReceiver objects) and registered with the system by callingregisterReceiver().


An implicit intentsimply describes the type of action to perform (and, optionally, the data upon which you’d like toperform the action) and allows the system to find a component on the device that can perform theaction and start it. If there are multiple components that can perform the action described by theintent, then the user selects which one to use.


Android supports many different qualifiers for your alternative resources. Thequalifier is a short string that you include in the name of your resource directories in order todefine the device configuration for which those resources should be used. As anotherexample, you should often create different layouts for your activities, depending on thedevice's screen orientation and size. For example, when the device screen is in portraitorientation (tall), you might want a layout with buttons to be vertical, but when the screen is inlandscape orientation (wide), the buttons should be aligned horizontally. To change the layoutdepending on the orientation, you can define two different layouts and apply the appropriatequalifier to each layout's directory name. Then, the system automatically applies the appropriatelayout depending on the current device orientation.

相关文章推荐

App Fundamentals

Briefly introduce to application app fundamentals.

Android API Guides 之 Introduction(1) - App Fundamentals

Application Fundamentals IN THIS DOCUMENT App Components Activating components The...

API Guides(一)——App Fundamentals To Intents and Intent Filters

Android应用基础概述 Android系统是一个多用户Linux系统,每一个app都是不同的用户 系统默认会分配每个App一个唯一的Linux用户ID(只用于系统,app并不知情),系统会给这个a...

Android 官方文档导读(App Fundamentals)

上一篇博客中我们和简要的介绍了一下android,我们将按照官方文档的顺序来继续讲解,这次讲解的是app。我们先来看看android对于一款app在安装进手机之后是怎么处理的:android操作系统是...

(API GUIDE 2)APP FUNDAMENTALS(应用基础)

应用的基础 这一节是综述了安卓应用的安装运行,软硬件兼容,以及各个部件的工作过程 安卓的应用是用java程序设计环境写出来的。安卓SDK工具编译你的代码——和所有的数据和资源文件一块儿——生成一个...

Android app fundamentals

最近学android,不知道怎么学的时候就开始翻译官方文档。渣四级的水平,求不喷。转载请说明出处! 应用基本原理 Android应用是用Java编程语言编写的。Android SDK工具将你的代码...

【Android】一个获取Android应用签名摘要的App工具

将APK发布到应用商店或接入第三方的SDK时,有时需要提供APK的签名摘要信息,可以通过摘要算法MD5或SHA-1来获取签名的摘要,除了获取自己的APK签名,也可以获取手机上其他已安装的APK签名,只...

安卓官方开发文档API GUIDE(1.1)Application Fundamentals 应用基础

安卓应用程序是使用JAVA语言进行开发的。安卓SDK 工具编译你的代码,并把编译后的代码和数据,资源文件一起加入到APK。APK就是 Android package(安卓包),他是一个以.apk为后缀...

Android应用程序基础(Application Fundamentals)

1、概述             Android应用程序使用Java做为开发语言。Android SDK tools将代码连同其它应用程序需要的数据和资源文件编译成一个Android包,一个使用.a...

Cloud computing fundamentals

A revolution is defined as a change in the way people think and behave that is both dramatic in natu...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:App Fundamentals摘要
举报原因:
原因补充:

(最多只允许输入30个字)