本文介绍了清单中的android anydensity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序遇到了一个令人惊讶的问题.

I have encountered an amazing problem, in my application.

当我在清单中放入anyDensity标记为false时,我的应用程序运行良好,但是只要我做到了,我的应用程序就会表现模糊,我会在我的应用程序上创建一些位图.如果我在清单中做anyDensity标记为false,那么任何设备都会出现问题,那么许多设备将无法在Playstore上看到我的应用,任何帮助将不胜感激.

When i put anyDensity tag false in manifest my application runs fine, but whenever i make it true my application acts blurry, i am creating some bitmaps on my application.any there is a problem if i do anyDensity tag false in manifest then many devices would not able to see my app on playstore,Any help will be appreciated.

<supports-screens
    android:anyDensity="false"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true" />

推荐答案

不过,您的原始帖子中没有太多信息.该文档指出:

not too much info in your original post, however. The documentation states:

所以我的第一个问题是,您是否包括所有资源以适应任何屏幕密度(即mdpi,hdpi,xhdpi,xxhdpi)?如果是,则应该没问题.在上面引用的最后一句话之后,我到达了这个链接.

So my first question is do you include all resources to accomodate any screen density (i. e. mdpi, hdpi, xhdpi, xxhdpi)? If yes, You should be fine. Following the last sentences of the quote above I arrived at this link.

它说:

您是否尝试过以编程方式对位图进行操作,而不是在整个应用程序中全局禁用此标志?

Have you tried doing it programmatically for your bitmaps, instead of disabling this flag globally for the whole app?

最后还有部分.也许会对您正确处理自定义位图有帮助?具体来说,此段听起来像是您的问题:

And finally there is this section. Maybe it will be helpful to you in properly handling your custom bitmaps? Specifically, this paragraph sound like your problem:

这篇关于清单中的android anydensity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 01:18