我是初学者Android开发人员,我正在努力让我的应用在所有屏幕上看起来都很好,我为hdpi,xhdpi,xxhdpi
制作了不同的布局来解决这个问题,因为一些搜索栏和文本视图在较小的屏幕上消失了。< / p>
有没有办法在Android清单中指定只有拥有hdpi屏幕及以上版本的用户可以从Playstore下载我的应用程序?
我查看了下面的stackoverflow,并阅读了android开发人员指南,但我找不到解决办法让它在hdpi
及以上版本上运行。
https://developer.android.com/guide/topics/manifest/compatible-screens-element.html https://developer.android.com/guide/practices/screens_support.html
答案 0 :(得分:0)
您需要在Manifest
中添加类似的内容,具体取决于您的需求:
<manifest ... >
...
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="xxhdpi" />
<screen android:screenSize="small" android:screenDensity="xxxhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxxhdpi" />
</compatible-screens>
<application ... >
...
<application>
</manifest>
请阅读此内容以获取更多信息:https://developer.android.com/guide/topics/manifest/compatible-screens-element.html