luke2012 Well-Known Member Licensed User Longtime User Mar 20, 2014 #1 Hi to all, I have to introduce a new splash in my app. Which is the best approach in order to display the image correctly on all devices ? 1) Create differtent version of the image based on the display resolution 2) Create a single image and set the gravity to center. (the problem in this case is to center correctly the image on all the kind of device). Any suggestion ?
Hi to all, I have to introduce a new splash in my app. Which is the best approach in order to display the image correctly on all devices ? 1) Create differtent version of the image based on the display resolution 2) Create a single image and set the gravity to center. (the problem in this case is to center correctly the image on all the kind of device). Any suggestion ?
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2014 #2 You can use ImageView with Gravity = Gravity.FILL. This way the image will be stretched as needed. Upvote 0
luke2012 Well-Known Member Licensed User Longtime User Mar 20, 2014 #3 Erel said: You can use ImageView with Gravity = Gravity.FILL. This way the image will be stretched as needed. Click to expand... Yes I'm already using this Gravity setting. My problem is that the image (480 x 800 pixel) is stretched on big screen (ex. Galaxy S4) and the image ratio is lost. The Galaxy S4 has a screen width of 1080 pixel and my image has a width of 480. Upvote 0
Erel said: You can use ImageView with Gravity = Gravity.FILL. This way the image will be stretched as needed. Click to expand... Yes I'm already using this Gravity setting. My problem is that the image (480 x 800 pixel) is stretched on big screen (ex. Galaxy S4) and the image ratio is lost. The Galaxy S4 has a screen width of 1080 pixel and my image has a width of 480.
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2014 #4 You should maintain the correct ratio yourself. See the code I posted here: http://www.b4x.com/android/forum/threads/live-wallpaper-background.24907/#post-144401 Upvote 0
You should maintain the correct ratio yourself. See the code I posted here: http://www.b4x.com/android/forum/threads/live-wallpaper-background.24907/#post-144401