Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
07/07/12 08:29 PM (13 years ago)

Header Image Size in high res Android device

I am creating an iOS and Android app with the same project. Most of the small device images are set to a width of 320, which works nicely on the iPhone. I then prepare two images for the header--for example, header.png (320 width) and [email protected] (640 width). The iPhone then uses the high res image and looks nice. Here is the problem. The Android devices I have been using for testing allow for higher resolution than 320 width. The pictures display centered on the screen, and very small--at 320 pixels, when the screen width appears to be around 500 pixels. Is there any way to set the header image in Android to default to stretch the image over the width of the screen? Android can't read the "@2x" files like the iOS devices, can it? Thank you!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/07/12 10:13 PM (13 years ago)
It's not a problem, just don't add @2x files to the Android project. You can add different images (size) just use same image name. Fred
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
07/07/12 10:53 PM (13 years ago)
Thanks, Fred! You must work all the time like I do. I did put different images in to compensate where I could, but the image displayed stays at the header image size I set in the Buzztouch. I would like the image to go to full width. On a high res device, 320 width in pixels looks pretty small.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/08/12 04:16 AM (13 years ago)
You're seeing one of the frustrations of developing for Android. Without a set pixel count for device widths, its hard to make the graphics fit every device out of the box. In my limited Android experience, I've used two different tricks for this problem. One, I've made the background of the header the same as the background of the whole screen, so the main content of the header seems to float on top. Two, I've made a slight gradient "stroke" on a header that blends from the header's color to the screen's background color. In the end, neither solution made the screen look as professional as my iphone equivalent version. Other than that, you might have to use some specific code to detect the device type, and define optional graphics outside of what BT can do by itself. Good luck!
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
07/08/12 04:27 PM (13 years ago)
Great ideas, Strobe! Really, it may be that the image looks perfect on some older devices anyway. Android is so much easier in some ways, but that is offset by the variation of devices out there!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.