Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 12    Views: 75

dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
02/25/13 03:38 PM (12 years ago)

menu list image - problem with header image

hi there, i'v been having a problem with the header image of this plugin, it won't fit the width of the screen, i tried about any size of image, including the 1536 x 720, the width still doesn't make it to the end of the screen. Thanks for the help David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/25/13 06:22 PM (12 years ago)
You know, it really depends on the device; especially with Android. I think it's a great plugin, myself. But the 'limitations' it has are related to the 'layout' of the device. Susan designed the image 'window' to resize, but it also keeps it's proportion. So, if the width doesn't make it to the end of the screen, then the image is as large as it can be 'in proportion', and the 'device' won't accomodate it being larger (without the image being out of proportion). There isn't really a fix, unless you want to change the layout of the menu_with_image.xml file, which can be done, but from that point forward, all images will be laid out 'to size', not to proportion. Depending on the image, this might matter, it might not. Hope this helps! Cheers! -- Smug
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
02/25/13 10:28 PM (12 years ago)
What device do you have? The Nexus 7 doesn't let the image stretch, even if it has enough pixels. Other than that, it has worked.
 
dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
like
02/25/13 11:28 PM (12 years ago)
i have an asus transformer 10" but even on the emulator it doesn't fully strech... thanks smug, don't know what i'll do yet, probably gonna try and test it on some more devices.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
02/26/13 01:42 AM (12 years ago)
Is it possible to NOT show the header image at all? I find that using the header image as it is now takes almost half of the screen on my phone, HTC Wildfire S, and there is no room for options to show.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/26/13 03:39 AM (12 years ago)
Menu with Image without the image? It's called a Menu ;) But I see exactly what you're saying... It really depends on your design. I use Menu with Image all the time. But I cut the vertical in half, so it comes out to 1536 x 360 rather than 720. Takes up less space, and allows for more of a 'banner' feel to the graphic. And that's what I use it for; banners. You have to go into the code to make those adjustments, but they're not difficult to do. Cheers! -- Smug
 
dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
like
02/26/13 05:12 AM (12 years ago)
Hi Smug, would love it if you could tell us were to do the code change on this one! Thanks David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/26/13 05:24 AM (12 years ago)
In iOS, do a search in this file: wb_screen_menuimage.m for this text: imageHeight and when you find it, you'll find code sort of like this... imageHeight=320 (or whatever...) That is where you make the change. For me to 'halve' it I make the sizes 180 & 75 (ipad/iphone), also, because the menu cells are 50 pixels, and the icons are 50 pixels, I usually make the icons 40 x 40 to give them a small border. If you're looking to do that you'll want to find this file: wb_cell_menuList.m and search for this text... @"listIconSizeSmallDevice":@"50" and change the value to 40 (or whatever...) In Android, to adjust image height you look in this file... screen_wb_menuimage.xml and look for the line... android:layout_height="150dip" I change mine to 75, as stated. I'm not sure where my icon notes are; perhaps it's obvious in the file... And sometimes, If my Menu has a long entry, it will get 'scrunched' under the icon on some devices. I've found that changing the left margin will 'assist' but not completely cure the issue; there are just some android devices that will 'not' be happy... WB_screen_menuimage.java; lp.leftMargin = 85 Hope this helps! Cheers! -- Smug
 
dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
like
02/26/13 05:27 AM (12 years ago)
Thanks, i will try it later on today David
 
dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
like
02/26/13 05:29 AM (12 years ago)
double post
 
dudave
Android Fan
Profile
Posts: 111
Reg: Mar 23, 2011
Israel, Netanya
1,110
like
02/26/13 05:46 AM (12 years ago)
triple post
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
02/27/13 12:04 AM (12 years ago)
@smug Thank you very much for the detailed explanation. Still, another question pops up -- how do you insert the banners?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/27/13 04:03 AM (12 years ago)
Well, the 'conventional' way is either to call it from the menu control panel configuration, or use a dataURL. I kind of cheat; I use a dataURL that points to a php script that rotates my banners. this way I have have more than one image display when the menu loads. If you're self hosted and PHP is running, there isn't any real configuration; you just add images into the same directory as the script and it will rotate them. I've put together about 5 images that it randomly grabs and displays as my menu 'banner'. https://dl.dropbox.com/u/115208762/rotateimage.txt Just create a directory somewhere on your hosted server. copy and paste this as 'rotateimage.php' in your newly created directory. Add some images in the same directory. jpg, png are preferred. gifs don't do so well on everything. In your menu with image, in the dataURL field type the url to the script, such as "http://www.yourserver.com/buzzmenuimages/rotateimage.php" and that should work fine for you. Cheers! -- Smug
 

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.