superuser
superuser

Reputation: 731

Android Folder drawable-xlarge vs drawable-tvdpi

For my app I would like to now what would happen if i had 2 folders: drawable-xlarge and drawable-tvdpi what will happen if I have a device with both asn xlarge screen and a tvdpi screen? How can I make the tvdpi take priority? Thanks!

Upvotes: 0

Views: 831

Answers (1)

kabuko
kabuko

Reputation: 36312

As to what will happen, look at the article on Providing Resources, particularly the Best Match section. The process that Android uses can be summarized as follows:

  1. Eliminate resource files that contradict the device configuration.
  2. Pick the (next) highest-precedence qualifier in the list
  3. Do any of the resource directories include this qualifier? If No, return to step 2 and look at the next qualifier. If Yes, continue to step 4.
  4. Eliminate resource directories that do not include this qualifier.
  5. Go back and repeat steps 2, 3, and 4 until only one directory remains.

Note the precedence of the qualifiers in table 2.

You may need to specify a more specific set of qualifiers (e.g. drawable-xlarge-tvdpi).

Upvotes: 2

Related Questions