Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 64

gusapps
Aspiring developer
Profile
Posts: 14
Reg: Nov 20, 2012
Pamplona
2,390
11/29/12 09:22 AM (13 years ago)

Button image problem

Hi. I'm trying to put a image in a buttons. I uploaded the images to the images folder and I selected the files for each button. The buttons has no image in the simulator. I see that the BT aplication I downloaded hasn´t a images folder. Any suggestion? Thank you
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
11/29/12 09:38 AM (13 years ago)
Hi welcome to Buzztouch. I think you are asking the suggestion for android app. All the images in an android app created with BT v 2.0 should go in the res--->drawable folder of the project. There used to be a BT_Images folder in the assets folder in the older version of BT but the new version does not has that folder anymore. Instead as i stated above the images should be placed in the drawable folder.
 
gusapps
Aspiring developer
Profile
Posts: 14
Reg: Nov 20, 2012
Pamplona
2,390
like
11/29/12 09:44 AM (13 years ago)
Yes, it´s for android. I´m looking for the files in drawable folder and they aren´t there. Should I copy my images in this folder? Other question, what are other drawable folder used for (hpdi,ldpi...)?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
11/29/12 09:52 AM (13 years ago)
yes you need to either drag drop the image files you refer in the project or you can copy paste it. but remember one thing, always use small case letters for the image files because the eclipse does not understand capital case letters. and the name of the image files in your project should match the name of the images in the bt control panel. the hdpi, mdpi, ldpi, etc folders stand for different resolution of the screens of android devices. normally developers put their image files in drawable folder but if you have same image created for different screens then they go in different folders. for ex- if i create an icon with 48x48 px named ic_launcher and another image with same name but intended for devices with hdpi (usually 4 inch screen devices) with 72x72 px and another image with same name but with 112x114 px intended for tablets (xhdpi) then i will place the first icon in drawable folder, the second one in drawable hdpi and the third one in the xhdpi folder. the android will pick the icon image considering the screen size of the device from respectable folder automatically.
 
gusapps
Aspiring developer
Profile
Posts: 14
Reg: Nov 20, 2012
Pamplona
2,390
like
11/29/12 09:58 AM (13 years ago)
Great help!!! Thanks Can i use "_" in file names? png vs jpg? which can be better? for buttons, images, backgrounds? I was looking for imagen sizes in forum and there are a lot of opinions, any suggestions for an aspiring?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
11/29/12 10:05 AM (13 years ago)
yes you can use _ sign in the file names. i personally prefer png format for images because they give a chance to have a transparent icons and are usually of better quality. android development is a bit tricky mostly because there are lot of devices with different screen size and manufacturers. so supporting multiple screens is very important. check out the following link to know more about supporting your app to multiple screens. http://developer.android.com/guide/practices/screens_support.html
 
gusapps
Aspiring developer
Profile
Posts: 14
Reg: Nov 20, 2012
Pamplona
2,390
like
11/29/12 10:57 AM (13 years ago)
Great help!!! Thanks Can i use "_" in file names? png vs jpg? which can be better? for buttons, images, backgrounds? I was looking for imagen sizes in forum and there are a lot of opinions, any suggestions for an aspiring?
 
gusapps
Aspiring developer
Profile
Posts: 14
Reg: Nov 20, 2012
Pamplona
2,390
like
11/29/12 11:04 AM (13 years ago)
Thank you very much. Regards
 

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.