zoukankan      html  css  js  c++  java
  • Android -- The Manifest File

        Before the Android system can start an app component, the system must know that the component exists by reading the app's AndroidManifest.xml file (the "manifest" file). Your app must declare all its components in this file, which must be at the root of the app project directory. 

    The manifest does a number of things in addition to declaring the app's components, such as:

    • Identify any user permissions the app requires, such as Internet access or read-access to the user's contacts.
    • Declare the minimum API Level required by the app, based on which APIs the app uses.
    • Declare hardware and software features used or required by the app, such as a camera, bluetooth services, or a multitouch screen.
    • API libraries the app needs to be linked against (other than the Android framework APIs), such as the Google Maps library.
    • And more

      Activities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run. However, broadcast receivers can be either declared in the manifest or created dynamically in code (as BroadcastReceiver objects) and registered with the system by calling registerReceiver().

      For every resource that you include in your Android project, the SDK build tools define a unique integer ID, which you can use to reference the resource from your app code or from other resources defined in XML. For example, if your app contains an image file named logo.png (saved in the res/drawable/ directory), the SDK tools generate a resource ID named R.drawable.logo, which you can use to reference the image and insert it in your user interface.

      One of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations. For example, by defining UI strings in XML, you can translate the strings into other languages and save those strings in separate files. Then, based on a language qualifier that you append to the resource directory's name (such as res/values-fr/ for French string values) and the user's language setting, the Android system applies the appropriate language strings to your UI.

  • 相关阅读:
    asp.net 学习连接
    学习笔记一
    windows 2008 r2 AD密码策略
    Windows Server 2008 R2之活动目录回收站
    用java 调用 .net 自定义的 Soap WEB Service
    昆明赶街时间
    Windows Server 2008 R2 AD的备份和恢复
    AD 自定义属性
    AD、IIS、asp.net
    wsgen与wsimport命令说明
  • 原文地址:https://www.cnblogs.com/echobfy/p/3548703.html
Copyright © 2011-2022 走看看