ImTrung
ImTrung

Reputation: 93

Providing Resources for Supporting Multiple Screens in Libgdx android

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?

Upvotes: 4

Views: 1259

Answers (1)

Doran
Doran

Reputation: 4091

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.

Upvotes: 6

Related Questions