androidAPIlevel

合集下载

Android SDK 22 开发环境安装

Android SDK 22 开发环境安装

Android SDK 22 开发环境安装androidsdk22开发环境安装本文描述androidsdk安装过程,包括:androidsdk2.2,eclipse3.5.2(galileo),和andoiddevelopmenttools(adt)plugin。

一个前提就是用户已经加装了jdk5.0或jdk6.0。

并且在系统环境变量设置了path涵盖jdk的bin目录。

[安装android2.2]须要晓得的就是这个zip圣塞雷县不是一个完备的软件包。

android软件包使用“组件”的形式,用户可以根据须要挑选出组件。

上述zip文件只涵盖了一个组件管理工具和一个基本的工具组件。

2.运行androidsdkandavdmanager.解压缩上面的zip纸盒,可以运转sdksetup.exe,即为启动了andoidsdkandavdmanager。

这个工具不但对androidsdk组件展开管理,同时也就是android交互式设备管理器。

(关于后者,参看后面示例)。

然后,可以用这个工具下载完整的androidsdk开发包。

需要注意的如果网络使用了代理服务器,则(有可能)需在这个工具里配置代理服务器域名和端口。

[加装eclipse][安装adt]adt版本:adt0.9.7(may2021)adt0.9.6(march2021)adt0.9.5(december2021)adt0.9.4(october2021)使用eclipse的升级管理器来安装adt:1.启动eclipse,然后步入help>installnewsoftware.2.在availablesoftware对话框里,点击add....5.返回availablesoftware界面,你必须看见\tools\。

挑选出checkbox。

页面next,拒绝接受licenseagreement,然后页面finish。

6.TNUMBERNLeclipse.[配置adt]布局eclipse里的adt,并使其指向androidsdk。

软酷网安卓知识补强考试题答案

软酷网安卓知识补强考试题答案

1.Android系统构架从高层到低层的顺序是()A.应用程序层、系统运行库层、核心层、应用程序框架层B.应用程序层、系统运行库层、应用程序框架层、核心层C.应用程序层、应用程序框架层、系统运行库层、核心层D.核心层、系统运行库层、应用程序层、应用程序框架层2.下列说法错误的是()A.Android不是基于Linux核心的B.Android词的本义指“机器人”C.Android是由Google发布的D.Androi3.下列哪一项说法是正确的()A.Android 3.0系统可以运行在手机终端B.Android 3.0系统不是针对手持式平板电脑而开发的C.android 3.0系统是针对手持式平板电脑而开发的,不能运行在手机终端D.Android 2.2系统不能运行于手机终端d支持Java语言开发应用程序4.在2011年11月推出的Android版本是()A.Android 1.6B.Android 2.2C.Android 3.0D.Android 4.05.Android是基于什么平台的()A.Unix平台B.Linux平台平台D.任意平台.6.下列哪些是Android模拟器不能实现的()A.发短信B.模拟GPS定位C.上网D.拍照7.通过DDMS中的()可以查看系统内部文件A.InnerFileExplorerB.InnerExplorerC.FileExplorerD.FileInnerExplorer8.关于AVD的说法正确的是()A.AVD只能通过eclipse开发环境创建B.AVD只能通过命令行创建C.AVD的全称是:Android Virtual DeviceD.每个AVD上只能配置一个运行项目9.关于Android模拟器的表示正确的是()A.Android模拟器可以在在AVD manager中新建模拟器的时候指定一个SdCardB.Android模拟器可以在在AVD manager中新建模拟器的时候指定两个SdCardC.Android模拟器可以在在AVD manager中新建模拟器的时候指定多个SdCardD.Android模拟器不能模拟出SdCard10.于Android SdCard的说法正确的是()A.通过getCacheDir()得到缓存目录B.通过getFileDir()得到文件目录C.SdCard是一张硬件卡D.往SdCard中写数据的权限是:android.permission.EXTERNAL_STORAGE11.AndroidManifest.xml 必须包括那些节点()A.manifestB.manifest、applicationC.manifest、application、activityD.manifest、application、activity、intent-filter12.每个<data>元素指定一个URI和数据类型(MIME类型)。

android cursorloader 用法

android cursorloader 用法

android cursorloader 用法"Android CursorLoader 用法- 解析与实例"Introduction:Android CursorLoader 是Android 系统提供的一个方便的类,用于异步加载数据库中的数据。

它是在Android API level 11 中引入的,并在后续版本中得到了改进。

CursorLoader 的使用可以简化开发者对数据库数据的管理和操作,同时也能提高应用的性能。

本文将一步一步回答有关Android CursorLoader 的用法。

1. 什么是CursorLoader?CursorLoader 是一个在后台线程中异步加载数据的Loader 类。

它被设计用于从内容提供器(ContentProvider)中检索数据,并将获取到的结果返回给UI 线程。

CursorLoader 的使用可以避免在主线程中进行繁重的数据库操作,从而提高应用的响应性和性能。

2. CursorLoader 的主要好处是什么?- 自动处理底层数据库操作,无需开发者手动编写繁琐的数据库查询代码。

- 提供与Activity 或Fragment 生命周期的无缝集成,确保数据的正确加载和更新。

- 通过ContentObserver 监听数据的变化,自动更新UI。

- 与LoaderCallbacks 接口一起使用,使得数据加载和更新过程更加简单和可靠。

3. 如何创建CursorLoader?CursorLoader 的创建需要以下几个步骤:Step 1: 实现LoaderCallbacks 接口首先,我们需要在Activity 或Fragment 中实现LoaderCallbacks 接口,并覆盖其中的几个方法。

这些方法包括onCreateLoader()、onLoadFinished() 和onLoaderReset()。

Step 2: 实现onCreateLoader() 方法在onCreateLoader() 方法中,我们需要指定需要加载的数据来源。

android ontrimmeomory level值

android ontrimmeomory level值

android ontrimmeomory level值在Android 中,onTrimMemory 方法是用于处理内存不足情况的一种机制。

该方法在Android 4.0(API 级别14)及以上版本引入,用于允许应用程序根据系统内存的不同级别来释放资源或采取其他适当的措施,以确保应用程序的性能和用户体验。

1. onTrimMemory 方法概述:onTrimMemory 方法是ComponentCallbacks2 接口的一部分,用于监听系统的内存状况。

在应用程序的生命周期中,系统可能会调用这个方法,传递不同级别的参数,以指示当前系统内存的状态。

2. onTrimMemory 方法参数:onTrimMemory 方法的参数是一个整数,表示不同的内存级别。

以下是一些常见的内存级别值:•TRIM_MEMORY_COMPLETE (80):系统内存极度不足,应用程序应该释放所有非关键的资源。

此时应该考虑清理缓存、关闭不必要的后台进程等。

•TRIM_MEMORY_MODERATE (60):系统内存较低,应用程序应该释放一些资源。

此时可以考虑清理一些缓存,以便回收内存。

•TRIM_MEMORY_BACKGROUND (40):应用程序在后台,系统内存较低,可能会被终止。

此时应释放一些不必要的资源,以便在后台运行时减少内存占用。

•TRIM_MEMORY_UI_HIDDEN (20):应用程序的UI 不可见,可以释放与UI 相关的资源。

3. onTrimMemory 的使用:@Overridepublic void onTrimMemory(int level){super.onTrimMemory(level);switch(level){case ComponentCallbacks2.TRIM_MEMORY_COMPLETE:// 释放所有非关键的资源break;case ComponentCallbacks2.TRIM_MEMORY_MODERATE:// 释放一些资源break;case ComponentCallbacks2.TRIM_MEMORY_BACKGROUND: // 应用程序在后台,释放资源break;case ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN:// UI 不可见,释放与UI 相关的资源break;// 其他内存级别...}}4. 注意事项:•在实现onTrimMemory 方法时,应该根据应用程序的实际需求选择释放哪些资源。

Android:代码多维度管理(产品风味)-flavorDimensionsproduct。。。

Android:代码多维度管理(产品风味)-flavorDimensionsproduct。。。

Android:代码多维度管理(产品风味)-flavorDimensionsproduct。

⼀、关于配置产品风味 Android studio 升级到3.0之后,gradle增加了多维度管理配置,便于同⼀个项⽬中创建应⽤的不同版本,分别管理依赖项并签署配置。

创建产品风味与创建构建类型类似:只需将它们添加到productFlavors {}代码块并配置您想要的设置。

产品风味⽀持与defaultConfig相同的属性,这是因为defaultConfig实际上属于类。

这意味着,您可以在defaultConfig {}代码块中提供所有风味的基本配置,每种风味均可更改任何这些默认值,例如。

当您创建新模块时,Android Studio 会⾃动为您创建调试和发布这两种构建类型。

尽管调试构建类型不会出现在构建配置⽂件中,Android Studio 会为其配置。

这样,您可以在安全的 Android 设备上调试应⽤并使⽤通⽤调试密钥库配置 APK 签署。

官⽹⽰例:android {...buildTypes {debug {...}release {...}}// Specifies the flavor dimensions you want to use. The order in which you// list each dimension determines its priority, from highest to lowest,// when Gradle merges variant sources and configurations. You must assign// each product flavor you configure to one of the flavor dimensions.flavorDimensions "api", "mode"productFlavors {demo {// Assigns this product flavor to the "mode" flavor dimension.dimension "mode"...}full {dimension "mode"...}// Configurations in the "api" product flavors override those in "mode"// flavors and the defaultConfig {} block. Gradle determines the priority// between flavor dimensions based on the order in which they appear next// to the flavorDimensions property above--the first dimension has a higher// priority than the second, and so on.minApi24 {dimension "api"minSdkVersion '24'// To ensure the target device receives the version of the app with// the highest compatible API level, assign version codes in increasing// value with API level. To learn more about assigning version codes to// support app updates and uploading to Google Play, read Multiple APK SupportversionCode 30000 + android.defaultConfig.versionCodeversionNameSuffix "-minApi24"...}minApi23 {dimension "api"minSdkVersion '23'versionCode 20000 + android.defaultConfig.versionCodeversionNameSuffix "-minApi23"...}minApi21 {dimension "api"minSdkVersion '21'versionCode 10000 + android.defaultConfig.versionCodeversionNameSuffix "-minApi21"...}}}...通过以上配置,就可以编译出多维度apk,以上⽰例可根据 "api" + "mode" 2个维度分别配置多个产品: ① minApi21 的 demo 、②minApi21 的 full 、③minApi23 的 demo 、④minApi23 的 full 、⑤minApi24 的 demo 、⑥minApi24 的 full⼆、⼩试⽜⼑ 从以上官⽹介绍可知产品多维度,即是在同⼀个⼯程上配置编译出各风味的apk版本,⽐如:演⽰⽤的简化版的和完整功能release版、两个平台UI的差异、多个项⽬之间功能增减...等等,通过多维度配置就不⽤⼀个版本维护⼀份⼯程,也不会因判断逻辑太多,导致代码臃肿。

Android 彻底退出(关闭)应用程序

Android 彻底退出(关闭)应用程序

做android开发时,发现一个关于android退出时不能彻底关闭的问题,比如:一个程序里new 出了N多个Thread,这样在退出程序的可能不能完全关闭,最后发现,只用finish()方法,有时候不能彻底退出,个人感觉还是要在适当的地方加上:System.exit(0);-----------------------------------------------------------------------------前言:finish():结束当前Activity,不会立即释放内存。

遵循android内存管理机制。

exit():结束当前组件如Activity,并立即释放当前Activity所占资源。

killProcess():结束当前组件如Activity,并立即释放当前Activity所占资源。

restartPackage():结束整个App,包括service等其它Activity组件。

1. finish()方法该方法可以结束当前Activity,但是如果你的App有很多Activity 的话,使用该方法显得有点捉襟见肘了。

另外,还有一个方法finishActivity (int requestCode) ,关于这个方法,先看看sdk的api说明吧!public voidfinishActivity (int requestCode)Since: APILevel 1Force finishanother activity that you had previously started withstartActi vityForResult(Intent, int).ParametersrequestCode The request code of the activity that you had given tostartActivityForResult(). If there are multiple activities started with this request code, they will all be finished.也许你会这样理解,Activity1 通过方法startActivityForResult (Intent, int) 启动Activity2,然后在Activity2 中通过方法finishActivity (intrequestCode)来结束Activity1,但是很不幸运,不是这样的。

安卓常见问题

安卓常见问题

1.如果你的项目的R文件不见的话,可以试下改版本号在保存,R文件不见一般都是布局文本出错导致.2. 布局文件不可以有大写字母3. 抛出如下错误WARNING: Application does not specify an API level requirement!,是由于没有指定users sdk的缘故,修改AndroidManifest.xml文件.加入:<uses-sdkandroid:minSdkVersion=”8″></uses-sdk> ##4. 机器内存的瓶颈,当apk大于我们的机器内存时,模拟器无情的抛出复制代码代码如下:Installation error: INSTALLFAILEDINSUFFICIENT_STORAGE Please check logcat output for more details. Launch canceled!让我们无法调试,现在我们来根治这个问题,解决方法有两种第一种(仅限apk小于机器内存,并且已安装上当前apk,只是无法再次debug)启动模拟器,然后进入菜单复制代码代码如下:settings->applications->mangeapplications-> select the application->select “unistall”.这样就能彻底删除了,然后再重新安装这个apk就没问题了第二种(通用)复制代码代码如下:-partition-size 128Eclipse中在项目Target的Options中添加。

##5.启动android模拟器时候如果提示:Failed to install on device ‘emulator-5554′: timeout 这是可能因为卡的原因导致启动超时,解决办法:eclipse -> window -> Preferences -> Android -> DDMS -> ADB connection time out(ms).把这个时间设置的长一些,默认是5秒即5000ms,我改成10秒就ok了。

Android 各版本SDK的区别

Android 各版本SDK的区别

Android 各个版本SDK的区别---转载Android 1.5 API变更概要:UI framework· Framework for easier background/UI thread interaction·新SlidingDrawer 组件·新HorizontalScrollview 组件AppWidget framework·一些关于创建桌面AppWidget 的API.·提供根据自定义的内容创建LiveFolders的APIMedia framework·原声录音和回放APIs·交互式的MIDI 回放引擎·开发者使用的视频录像API (3GP format).·视频相片分享Intents·媒体搜索IntentInput Method framework·输入法服务framework·文本预测引擎·提供具有下载能力的IME给使用者Application-defined hardware requirements应用可定义硬件需求,应用程序可以定义说明此程序需要什么硬件需求.比如是否需要物理键盘或者轨迹球.Speech recognition framework·支持语音识别库.Miscellaneous API additions· LocationManager -应用可以接收到位置改变的信息.· WebView - 触摸start/end/move/cancel DOM 事件的支持·重建Sensor Manager APIs· GLSurfaceView - 创建OpenGL 应用更加方便的framework .·软件升级安装成功的Broadcast Intent - 更加平和优秀的软件升级体验Android 1.6 API变更概要:UI framework·新的类android.view.animation 控制动画行为:o AnticipateInterpolatoro AnticipateOvershootInterpolatoro BounceInterpolatoro OvershootInterpolator·新的XML 属性android onClick ,从一个layout文件描述一个view的View.OnClickListener.·对不同分辨率的屏幕的新的支持. 对于Bitmap和Canvas会执行有针对性的缩放行为.该框架会根据屏幕分辨率和其他内容自动缩放bitmap等.要在你的应用中使用Android 1.6包含的API的话你必须要设置"4"属性在manifest的元素中Search framework·应用程序现在可以公开的有关内容,作为建议放入快速搜索框,新的设备范围内的搜索功能,是可从主屏幕搜索。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Android API LevelsAs you develop your application on Android, it's useful to understand the platform's general approach to API change management. It's also important to understand the API Level identifier and the role it plays in ensuring your application's compatibility with devices on which it may be installed.The sections below provide information about API Level and how it affects your applications.For information about how to use the "Filter by API Level" control available in the API reference documentation, see Filtering the documentation at the end of this document.What is API Level?API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform.The Android platform provides a framework API that applications can use to interact with the underlying Android system. The framework API consists of:A core set of packages and classesA set of XML elements and attributes for declaring a manifest fileA set of XML elements and attributes for declaring and accessing resourcesA set of IntentsA set of permissions that applications can request, as well as permission enforcements included in the systemEach successive version of the Android platform can include updates to the Android application framework API that it delivers.Updates to the framework API are designed so that the new API remains compatible with earlier versions of the API. That is, most changes in the API are additive and introduce new or replacement functionality. As parts of the API are upgraded, the older replaced parts are deprecated but are not removed, so that existing applications can still use them. In a very small number of cases, parts of the API may be modified or removed, although typically such changes are only needed to ensure API robustness and application or system security. All other API parts from earlier revisions are carried forward without modification.The framework API that an Android platform delivers is specified using an integer identifier called "API Level". Each Android platform version supports exactly one API Level, although support is implicit for all earlier API Levels (down to API Level 1). The initial release of the Android platform provided API Level 1 and subsequent releases have incremented the API Level.The following table specifies the API Level supported by each version of the Android platform.Platform V ersion API LevelAndroid 2.2 8Android 2.1 7Android 2.0.1 6Android 2.0 5Android 1.6 4Android 1.5 3Android 1.1 2Android 1.0 1Uses of API Level in AndroidThe API Level identifier serves a key role in ensuring the best possible experience for users and application developers:It lets the Android platform describe the maximum framework API revision that it supportsIt lets applications describe the framework API revision that they requireIt lets the system negotiate the installation of applications on the user's device, such that version-incompatible applications are not installed.Each Android platform version stores its API Level identifier internally, in the Android system itself.Applications can use a manifest element provided by the framework API —<uses-sdk> —to describe the minimum and maximum API Levels under which they are able to run, as well as the preferred API Level that they are designed to support. The element offers three key attributes: android:minSdkV ersion — Specifies the minimum API Level on which the application is able to run. The default value is "1".android:targetSdkV ersion — Specifies the API Level on which the application is designed to run. In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.android:maxSdkV ersion — Spec ifies the maximum API Level on which the application is able to run. Important: Please read the <uses-sdk> documentation before using this attribute.For example, to specify the minimum system API Level that an application requires in order to run, the application would include in its manifest a <uses-sdk> element with a android:minSdkV ersion attribute. The value of android:minSdkV ersion would be the integer corresponding to the API Level of the earliest version of the Android platform under which the application can run.When the user attempts to install an application, or when revalidating an appplication after a system update, the Android system first checks the <uses-sdk> attributes in the application's manifest and compares the values against its own internal API Level. The system allows the installation to begin only if these conditions are met:If a android:minSdkV ersion attribute is declared, its value must be less than or equal to the system's API Level integer. If not declared, the system assumes that the application requires API Level 1.If a android:maxSdkV ersion attribute is declared, its value must be equal to or greater than the system's API Level integer. If not declared, the system assumes that the application has no maximum API Level. Please read the <uses-sdk> documentation for more information about how the system handles this attribute.When declared in an application's manifest, a <uses-sdk> element might look like this:<manifest>...<uses-sdk android:minSdkV ersion="5" />...</manifest>The principal reason that an application would declare an API Level in android:minSdkV ersion is to tell the Android system that it is using APIs that were introduced in the API Level specified. If the application were to be somehow installed on a platform with a lower API Level, then it would crash at run-time when it tried to access APIs that don't exist. The system prevents such an outcome by not allowing the application to be installed if the lowest API Level it requires is higher than that of the platform version on the target device.For example, the android.appwidget package was introduced with API Level 3. If an application uses that API, it must declare a android:minSdkV ersion attribute with a value of "3". The application will then be installable on platforms such as Android 1.5 (API Level 3) and Android 1.6 (API Level 4), but not on the Android 1.1 (API Level 2) and Android 1.0 platforms (API Level 1).For more information about how to specify an application's API Level requirements, see the <uses-sdk> section of the manifest file documentation.Development ConsiderationsThe sections below provide information related to API level that you should consider when developing your application.Application forward compatibilityAndroid applications are generally forward-compatible with new versions of the Android platform.Because almost all changes to the framework API are additive, an Android application developed using any given version of the API (as specified by its API Level) is forward-compatible with later versions of the Android platform and higher API levels. The application should be able to run on all later versions of the Android platform, except in isolated cases where the application uses a part of the API that is later removed for some reason.Forward compatibility is important because many Android-powered devices receive over-the-air (OTA) system updates. The user may install your application and use it successfully, then later receive an OTA update to a new version of the Android platform. Once the update is installed, your application will run in a new run-time version of the environment, but one that has the API and system capabilities that your application depends on.In some cases, changes below the API, such those in the underlying system itself, may affect your application when it is run in the new environment. For that reason it's important for you, as the application developer, to understand how the application will look and behave in each system environment. To help you test your application on various versions of the Android platform, the Android SDK includes multiple platforms that you can download. Each platform includes a compatible system image that you can run in an A VD, to test your application.Application backward compatibilityAndroid applications are not necessarily backward compatible with versions of the Android platform older than the version against which they were compiled.Each new version of the Android platform can include new framework APIs, such as those that give applications access to new platform capabilities or replace existing API parts. The new APIs are accessible to applications when running on the new platform and, as mentioned above, also when running on later versions of the platform, as specified by API Level. Conversely, because earlier versions of the platform do not include the new APIs, applications that use the new APIs are unable to run on those platforms.Although it's unlikely that an Android-powered device would be downgraded to a previous version of the platform, it's important to realize that there are likely to be many devices in the field that run earlier versions of the platform. Even among devices that receive OTA updates, some might lag and might not receive an update for a significant amount of time.Selecting a platform version and API LevelWhen you are developing your application, you will need to choose the platform version against which you will compile the application. In general, you should compile your application against the lowest possible version of the platform that your application can support.Y ou can determine the lowest possible platform version by compiling the application against successively lower build targets. After you determine the lowest version, you should create an A VD using the corresponding platform version (and API Level) and fully test your application. Make sure to declare a android:minSdkV ersion attribute in the application's manifest and set its value to the API Level of the platform version.Declaring a minimum API LevelIf you build an application that uses APIs or system features introduced in the latest platform version, you should set the android:minSdkV ersion attribute to the API Level of the latest platform version. This ensures that users will only be able to install your application if their devices are running a compatible version of the Android platform. In turn, this ensures that your application can function properly on their devices.If your application uses APIs introduced in the latest platform version but does not declare a android:minSdkV ersion attribute, then it will run properly on devices running the latest version of the platform, but not on devices running earlier versions of the platform. In the latter case, the application will crash at runtime when it tries to use APIs that don't exist on the earlier versions.T esting against higher API LevelsAfter compiling your application, you should make sure to test it on the platform specified in the application's android:minSdkV ersion attribute. To do so, create an A VD that uses the platform version required by your application. Additionally, to ensure forward-compatibility, you should run and test the application on all platforms that use a higher API Level than that used by your application.The Android SDK includes multiple platform versions that you can use, including the latest version, and provides an updater tool that you can use to download other platform versions as necessary.To access the updater, use the android command-line tool, located in the <sdk>/tools directory. Y ou can launch the Updater by using the android command without specifying any options. Y ou can also simply double-click the android.bat (Windows) or android (OS X/Linux) file. In ADT, you can also access the updater by selecting Window > Android SDK and A VD Manager.To run your application against different platform versions in the emulator, create an A VD for each platform version that you want to test. For more information about A VDs, see Android Virtual Devices. If you are using a physical device for testing, ensure that you know the API Level of the Android platform it runs. See the table at the top of this document for a list of platform versions and their API Levels.Using a Provisional API LevelIn some cases, an "Early Look" Android SDK platform may be available. To let you begin developing on the platform although the APIs may not be final, the platform's API Level integer will not be specified. Y ou must instead use the platform's provisional API Level in your application manifest, in order to build applications against the platform. A provisional API Level is not an integer, but a string matching the codename of the unreleased platform version. The provisional API Level will be specified in the release notes for the Early Look SDK release notes and is case-sensitive.The use of a provisional API Level is designed to protect developers and device users from inadvertently publishing or installing applications based on the Early Look framework API, which may not run properly on actual devices running the final system image.The provisional API Level will only be valid while using the Early Look SDK and can only be used to run applications in the emulator. An application using the provisional API Level can never be installed on an Android device. At the final release of the platform, you must replace any instances of the provisional API Level in your application manifest with the final platform's actual API Level integer.Filtering the Reference Documentation by API LevelReference documentation pages on the Android Developers site offer a "Filter by API Level" control in the top-right area of each page. Y ou can use the control to show documentation only for parts of the API that are actually accessible to your application, based on the API Level that it specifies in the android:minSdkV ersion attribute of its manifest file.To use filtering, select the checkbox to enable filtering, just below the page search box. Then set the "Filter by API Level" control to the same API Level as specified by your application. Notice that APIs introduced in a later API Level are then grayed out and their content is masked, since they would not be accessible to your application.Filtering by API Level in the documentation does not provide a view of what is new or introduced in each API Level — it simply provides a way to view the entire API associated with a given API Level, while excluding API elements introduced in later API Levels.If you decide that you don't want to filter the API documentation, just disable the feature using the checkbox. By default, API Level filtering is disabled, so that you can view the full framework API, regardless of API Level.Also note that the reference documentation for individual API elements specifies the API Level at which each element was introduced. The API Level for packages and classes is specified as "Since <api level>" at the top-right corner of the content area on each documentation page. The API Level for class members is specified in their detailed description headers, at the right margin.。

相关文档
最新文档