使用 Android APK 2.2 打开硬件加速(如果可用)(例如 Android 3+) [英] Turn on hardware acceleration if available (such Android 3+) with Android APK 2.2

查看:21
本文介绍了使用 Android APK 2.2 打开硬件加速(如果可用)(例如 Android 3+)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Android 3.0开发了一个应用,运行良好,但客户端坚持兼容2.2设备.

I developed a application for Android 3.0, and it's runs perfectly well, but the client insist on compatibility with 2.2 devices.

禁用硬件加速、使用 Android 兼容包、NIO 向后移植支持(用于任务和执行程序)和一些视图方法的重新实现我能够将我的应用程序移植到 Android 2.2 并且工作得非常好,但是如果我运行这个 apk进入较新的设备,性能非常慢,所以我想知道如何打开硬件加速(如果可用)但仍然使用我的 2.2 APK.

Disabling hardware acceleration, using Android Compatibility Package, a NIO-backport support (For tasks and executors) and some reimplementation of View methods I was able to port my app for Android 2.2 and works really good, but if I run this apk into a newer device the performance is extremely slowly, so I want to know how to turn on hardware acceleration if available but still uses my 2.2 APK.

推荐答案

android:hardwareAccelerated="true" 添加到您的清单中,用于 .

Add android:hardwareAccelerated="true" to your manifest, either for the <activity> or the <application>.

此属性在旧版本的 Android 上将被忽略,但在 Android 3.0+ 上会得到支持.

This attribute will be ignored on older versions of Android, but will be honored on Android 3.0+.

这将要求您将构建目标设置为 API 级别 11 或更高,但您可能已经拥有了.

This will require you to have set your build target to API Level 11 or higher, but you probably already have that.

这篇关于使用 Android APK 2.2 打开硬件加速(如果可用)(例如 Android 3+)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆