简体   繁体   中英

Style.xml file based on screen size

Android supports layouts for different screen sizes by suffixing layout folders with a certain screen size (large, sw600 etc). Is this possible to do for styles as well? There is nothing in their documentation that I have found yet, but it seems logical to desire style.xml's that support specific screen sizes.

yes its very simple just create values folder with the right suffix , you need EXAMPLE:

values-sw600  values-hdpi

look here at bottom of the page http://developer.android.com/guide/practices/screens_support.html

Yes you can do it.

Create a folder like for example values-sw600dp in the res directory and there you add your style.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM