Discussion Forums  >  Images, Documents, File Locations

Replies: 15    Views: 430

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
05/28/12 11:49 AM (13 years ago)

need help with different drawable images for different densities in android

As the title suggests I'm having a real problem figuring this out. My home screen has 3 rows of 3 icons. I can get it to look perfect in normal screen sizes with HD screens but on medium density screens the icons are much too big. The icons in the drawable-hdpi folder are 150x150 and the ones in the drawable-mdpi folder are 100x100 as per this website: http://developer.android.com/guide/practices/screens_support.html#qualifiers But in both the simulators and on friends phones there is no change in the layout when I changed the icons. It still looks great on normal HD screens but too big and cramped on normal sized medium density screens. Does anyone have ANY advice? Please? This is making me want to just stop dealing with android altogether, not sure why its so difficult. THANKS!!!! Josh
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/28/12 12:24 PM (13 years ago)
Yesterday posted a link to designing for a Android Tablet in my Android section. Should help. Fred
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/28/12 01:22 PM (13 years ago)
Thanks but that article just says to use different sized images for different densities which is what I tried. Buzztouch project comes with different drawable folders so this should work, right???
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/28/12 01:25 PM (13 years ago)
Yes, and you can add additional folders if you need to. You can modify the code to use the additional folders with if else. Fred
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/28/12 01:29 PM (13 years ago)
I think I'll reread that article again. Fred
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/28/12 02:18 PM (13 years ago)
All I have done thus far is put the images in the folders, do I need to modify any code before doing this? I figured it would be automatic.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/28/12 10:40 PM (13 years ago)
The three folders are automatic. Just be sure to enter image name in appropriate button screen.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/28/12 11:49 PM (13 years ago)
The appropriate button screen? Isn't there just the one button screen?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/29/12 12:10 AM (13 years ago)
Button Items property screen. (Not referring to a "Buzztouch Screen" ). I'm referring to the screen that pops up when you click on " Selecting this button... " in the Menu (button) set up. Or perhaps I should use window instead of screen.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/29/12 03:18 PM (13 years ago)
I think I found part of the problem. All of my menu button images are in Assets/BT_images folder. I copied those files and put them in their respective drawable folders for different densities. However when I tried deleting them from the BT_images folder the buttons stopped loading. So it looks like the app is ignoring all the png files in the drawable folders which is why it's not working. How do I get eclipse to look at the drawable folders and not just the BT_images folder????
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/29/12 03:48 PM (13 years ago)
Big problem. You can't use both BT_images and drawable folders for button images. BT_images is BT_1.5 Drawable is BTv2.0 Are you BTv1.5 or BTv2.0 ?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/29/12 03:51 PM (13 years ago)
BT 1.5. But it still comes with the drawable folders for different densities.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/29/12 03:55 PM (13 years ago)
Don't remember, what folder are the drawable folders in? Fred
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
05/29/12 04:00 PM (13 years ago)
res
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/29/12 04:35 PM (13 years ago)
Won't work. In BTv1.5 button images must go into the BT_images folder. You would use the res > drawable if you were creating a hybrid BTv1.5 / Non-Buzztouch app.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/29/12 04:40 PM (13 years ago)
This is one of the big differences between BTv1.5 and BTv2.0 location of app resources. You should do two things: Read my Source Code (Android) article and Explain why you're using BTv1.5. BTv2.0 Android make BTv1.5 Android look like a poor cousin. Fred
 

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.