Providing Resources for Supporting Multiple Screens in Libgdx android(在 Libgdx android 中提供支持多屏的资源)
问题描述
在 android 中,我可以为许多屏幕分辨率提供替代资源,例如 drawable-hdpi、drawable-ldpi 和 drawable-mdpi.libgdx 是否会意识到它正在使用特定的屏幕密度并为其使用适当的资源?
In android I can supply alternative resources for many screen resolution such as drawable-hdpi, drawable-ldpi, and drawable-mdpi. Will libgdx realize it is working with a certain screen density and use the appropriate resource for it?
推荐答案
Libgdx 不像 Android 那样直接支持多分辨率资源.但是,Libgdx 确实有一些支持.ResolutionFileResolver 类允许您将文件名解析为最佳分辨率.但是,您有责任设置可能的分辨率和目录名称.AssetManagerTest.
Libgdx doesn't directly support multi-resolution resources the way Android does. However, Libgdx does have some support. The ResolutionFileResolver class allows you to resolve file names to the best resolution. However, you are responsible for setting the possible resolutions and directory names. There is an example use in the AssetManagerTest.
这篇关于在 Libgdx android 中提供支持多屏的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Libgdx android 中提供支持多屏的资源


基础教程推荐
- iOS4 创建后台定时器 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01