P Pantelis Member Licensed User Longtime User Jul 8, 2014 #1 Hi all I try to see what my app looks like in different devices and i am confused about the automatic selection of bitmap resources. I have these directories in res/ drawable drawable_ldpi drawable_mdpi drawable_hdpi drawable_xhdpi with 9patch images inside and i have these two emulator devices: Screen size: 5,5” - Resolution: 852 x 480 – Density: mdpi Screen size: 11” - Resolution: 1280 x 720 – Density: ldpi When I run my app on first device it chooses the drawable_mdpi forder for the 9patch images and looks OK. But when I run it on second device although I have a device with bigger resolution it chooses the drawable_ldpi folder and not the drawable_hdpi. Yes it is a ldpi device but we have a bigger resolution here and as it selects the folder with smaller sized images it looks wrong. Why the selection of resources is made according the density and not the resolution? Do I miss something? Thanks
Hi all I try to see what my app looks like in different devices and i am confused about the automatic selection of bitmap resources. I have these directories in res/ drawable drawable_ldpi drawable_mdpi drawable_hdpi drawable_xhdpi with 9patch images inside and i have these two emulator devices: Screen size: 5,5” - Resolution: 852 x 480 – Density: mdpi Screen size: 11” - Resolution: 1280 x 720 – Density: ldpi When I run my app on first device it chooses the drawable_mdpi forder for the 9patch images and looks OK. But when I run it on second device although I have a device with bigger resolution it chooses the drawable_ldpi folder and not the drawable_hdpi. Yes it is a ldpi device but we have a bigger resolution here and as it selects the folder with smaller sized images it looks wrong. Why the selection of resources is made according the density and not the resolution? Do I miss something? Thanks
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2014 #2 If you are using 9 patch images then why not use the same resource file for all resolutions? Upvote 0
P Pantelis Member Licensed User Longtime User Jul 8, 2014 #3 Hi Erel In my case I design 9patch images for my buttons with special effect on the edges of the image. It look OK in mdpi devices but when I use the same images on higher resolutions those edges looks smaller and smaller. I have found the idea of using different 9-patch images for different densities here http://stackoverflow.com/questions/9941471/different-9-patch-images-for-different-densities Upvote 0
Hi Erel In my case I design 9patch images for my buttons with special effect on the edges of the image. It look OK in mdpi devices but when I use the same images on higher resolutions those edges looks smaller and smaller. I have found the idea of using different 9-patch images for different densities here http://stackoverflow.com/questions/9941471/different-9-patch-images-for-different-densities