Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Like layout-sw600dp,alternative for drawable

Tags:

android

My question is straight forward and simple, Like there is layout-sw600dp,values-sw600dp, for layout and values respectively, what is there for drawable folder in relative to size of screen.

I read in various document that if we want to use any screen more than or equal to 7 inches we can use layout-sw600dp folder, and for any lesser screen size device, layout folder will be taken into consideration. So how we can make use of same concept for images also. Right now there are ldpi, mdpi, hdpi folder, but images are taken in accordance of screen density not with screen size.Now if I am developing an app which work both on device and phone, what should be my probable approach for images.

Thanks in advance, please guide me.

like image 805
Android Avatar asked Apr 09 '12 09:04

Android


2 Answers

you can also use the same concept for drawable like drawable-sw600dp,drawable-sw600dp-mdpi etc. I have used this in my application .

like image 125
Sujit Avatar answered Nov 18 '22 18:11

Sujit


I'm not 100% on this one, but I think you can also use the same convention with drawables. Try drawable-sw600dp-hdpi or something similar. Though I also do have a few questions you may want to answer before proceeding:

  1. Why would you want a different image (not resolution) for a bigger screen size?
  2. As you already know, a 7-inch device would be using the layout-sw600dp folder, so why not have a different name for a different drawable? That would look a lot cleaner, imo.
like image 20
josephus Avatar answered Nov 18 '22 17:11

josephus