
android开发文档翻译
文章平均质量分 86
光英的记忆
新世界,新创造
展开
-
java规避空指针异常
if("0".equals(groupResponseList.get(position).getType()))防止空指针将已知对象放在前面,这样有助于规避空指针原创 2016-04-06 12:30:10 · 610 阅读 · 0 评论 -
More Resource Types
This page defines more types of resources you can externalize, including:BoolXML resource that carries a boolean value.ColorXML resource that carries a color value (a hexadecimal color).DimensionX翻译 2016-04-05 12:46:25 · 567 阅读 · 0 评论 -
Style Resource
A style resource defines the format and look for a UI. A style can be applied to an individual View (from within a layout file) or to an entire Activity or application (from within the manifest fi翻译 2016-04-05 12:44:55 · 447 阅读 · 0 评论 -
String Resources
A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings:StringXML翻译 2016-04-05 12:41:58 · 1003 阅读 · 0 评论 -
Menu Resource
A menu resource defines an application menu (Options Menu, Context Menu, or submenu) that can be inflated withMenuInflater.For a guide to using menus, see the Menus developer guide.FILE LOCATION:r翻译 2016-04-05 12:40:16 · 476 阅读 · 0 评论 -
Layout Resource
A layout resource defines the architecture for the UI in an Activity or a component of a UI.FILE LOCATION:res/layout/filename.xmlThe filename will be used as the resource ID.COMPILED RESOURCE DATA翻译 2016-04-05 12:38:35 · 1011 阅读 · 0 评论 -
Drawable Resources
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes翻译 2016-04-05 12:36:18 · 739 阅读 · 0 评论 -
Color State List Resource
A ColorStateList is an object you can define in XML that you can apply as a color, but will actually change colors, depending on the state of the View object to which it is applied. For example, a翻译 2016-04-05 12:33:55 · 454 阅读 · 0 评论 -
Animation Resources
An animation resource can define one of two types of animations:Property AnimationCreates an animation by modifying an object's property values over a set period of time with an Animator.View Anim翻译 2016-04-05 12:27:34 · 586 阅读 · 0 评论 -
App Manifest
Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file presents essential information about your app to the Android system, infor翻译 2016-04-05 23:43:16 · 847 阅读 · 0 评论 -
<action>
SYNTAX: android:name="string" />CONTAINED IN:DESCRIPTION:Adds an action to an intent filter. An element must contain one or more elements. If it doesn't contain any, no Intent obj翻译 2016-04-05 23:44:52 · 291 阅读 · 0 评论 -
<activity>
SYNTAX: android:allowEmbedded=["true" | "false"] android:allowTaskReparenting=["true" | "false"] android:alwaysRetainTaskState=["true" | "false"] android:autoRemoveFrom翻译 2016-04-05 23:47:15 · 1374 阅读 · 0 评论 -
intent-filter
SYNTAX: android:icon="drawable resource" android:label="string resource" android:priority="integer" > . . .CONTAINED IN: MUST CONTAIN:CAN CONTAIN: DESC翻译 2016-04-06 12:27:40 · 322 阅读 · 0 评论 -
instrumentation
SYNTAX: android:functionalTest=["true" | "false"] android:handleProfiling=["true" | "false"] android:icon="drawable resource" android:label="string翻译 2016-04-06 12:26:07 · 442 阅读 · 0 评论 -
data
SYNTAX: android:scheme="string" android:host="string" android:port="string" android:path="string" android:pathPattern="string" android:pathPrefix="string" android翻译 2016-04-06 12:22:07 · 374 阅读 · 0 评论 -
grant-uri-permission
SYNTAX: android:path="string" android:pathPattern="string" android:pathPrefix="string" />CONTAINED IN:DESCRIPTION:Specifies which data subsets o翻译 2016-04-06 12:23:41 · 2376 阅读 · 0 评论 -
compatible-screens
SYNTAX:compatible-screens> screen android:screenSize=["small" | "normal" | "large" | "xlarge"] android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"翻译 2016-04-06 12:20:11 · 422 阅读 · 0 评论 -
category
SYNTAX: android:name="string" />CONTAINED IN:DESCRIPTION:Adds a category name to an intent filter. See Intents and Intent Filters for details on intent filters and the role of category s翻译 2016-04-06 12:17:46 · 339 阅读 · 0 评论 -
application
SYNTAX: android:allowTaskReparenting=["true" | "false"] android:allowBackup=["true" | "false"] android:backupAgent="string" android:banner="drawable resource"翻译 2016-04-06 12:14:16 · 739 阅读 · 0 评论 -
activity-alias
SYNTAX: android:enabled=["true" | "false"] android:exported=["true" | "false"] android:icon="drawable resource" android:label="string resource"翻译 2016-04-06 12:12:26 · 522 阅读 · 0 评论 -
Resource Types
Each of the documents in this section describe the usage, format and syntax for a certain type of application resource that you can provide in your resources directory (res/).Here's a brief summar翻译 2016-04-04 20:15:04 · 363 阅读 · 0 评论 -
Handling Runtime Changes
Some device configurations can change during runtime (such as screen orientation, keyboard availability, and language). When such a change occurs, Android restarts the running Activity (onDestroy() is翻译 2016-04-04 20:03:13 · 339 阅读 · 0 评论 -
Accessing Resources
Once you provide a resource in your application (discussed in Providing Resources), you can apply it by referencing its resource ID. All resource IDs are defined in your project's Rclass, which the翻译 2016-04-04 20:01:19 · 627 阅读 · 0 评论 -
Android Interface Definition Language (AIDL)
AIDL (Android Interface Definition Language) is similar to other IDLs you might have worked with. It allows you to define the programming interface that both the client and service agree upon in order翻译 2016-04-03 19:26:58 · 517 阅读 · 0 评论 -
android的Services生命周期和使用方法
A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will翻译 2016-04-03 19:20:34 · 895 阅读 · 0 评论 -
Fragments
A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple acti翻译 2016-04-03 12:49:01 · 822 阅读 · 0 评论 -
Activities
An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. Each activi翻译 2016-04-03 12:45:40 · 770 阅读 · 0 评论 -
Common Intents
An intent allows you to start an activity in another app by describing a simple action you'd like to perform (such as "view a map" or "take a picture") in an Intent object. This type of intent is ca翻译 2016-04-03 12:34:12 · 2014 阅读 · 0 评论 -
Intents and Intent Filters
An Intent is a messaging object you can use to request an action from another app component. Although intents facilitate communication between components in several ways, there are three fundamental翻译 2016-04-03 11:43:12 · 520 阅读 · 0 评论 -
System Permissions—— android系统权限
System PermissionsIn this documentSecurity ArchitectureApplication SigningUser IDs and File AccessUsing PermissionsNormal and Dangerous PermissionsPermission GroupsDefining and翻译 2016-04-03 00:46:17 · 2138 阅读 · 0 评论 -
Device Compatibility
Device CompatibilityAndroid is designed to run on many different types of devices, from phones to tablets and televisions. As a developer, the range of devices provides a huge potential audience翻译 2016-04-03 00:20:28 · 710 阅读 · 1 评论 -
Content Providers
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects da翻译 2016-04-03 19:29:45 · 370 阅读 · 0 评论 -
Content Provider Basics
A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the data. However, content providers a翻译 2016-04-03 19:32:48 · 641 阅读 · 0 评论 -
Creating a Content Provider
A content provider manages access to a central repository of data. You implement a provider as one or more classes in an Android application, along with elements in the manifest file. One of your clas翻译 2016-04-03 19:35:25 · 624 阅读 · 0 评论 -
Providing Resources
You should always externalize application resources such as images and strings from your code, so that you can maintain them independently. You should also provide alternative resources for specific d翻译 2016-04-03 20:34:02 · 804 阅读 · 0 评论 -
App Resources and Resources Overview
It takes more than just code to build a great app. Resources are the additional files and static content that your code uses, such as bitmaps, layout definitions, user interface strings, animation ins翻译 2016-04-03 20:28:18 · 482 阅读 · 0 评论 -
Processes and Threads
When an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution翻译 2016-04-03 20:00:36 · 426 阅读 · 0 评论 -
App Widget Host
The Android Home screen available on most Android devices allows the user to embed app widgets for quick access to content. If you're building a Home replacement or a similar app, you can also allow翻译 2016-04-03 19:57:13 · 596 阅读 · 0 评论 -
App Widgets
App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates. These views are referred to as Widgets in the user interf翻译 2016-04-03 19:54:33 · 954 阅读 · 0 评论 -
Storage Access Framework
Android 4.4 (API level 19) introduces the Storage Access Framework (SAF). The SAF makes it simple for users to browse and open documents, images, and other files across all of their their preferred do翻译 2016-04-03 19:51:22 · 1271 阅读 · 0 评论