Discussion Forums  >  Uncategorized

Replies: 6    Views: 228

danimal
Aspiring developer
Profile
Posts: 8
Reg: Feb 17, 2011
Louisville
380
05/24/11 06:38 AM (14 years ago)

Is it possible to remove App Image - BT 1.4

Hi, I am making android apps in BT 1.4, and I find that the app image - the large image above the menu items - is stealing too much real estate and forcing more valuable menu items below the fold. I'd like to remove it altogether. I think I can probably find where it lives in the source code, and then I'll see if I can comment it out, but I thought it might be worth asking if anyone else has done this. I have tried commenting things out here and there and sometimes I find things are connected in ways I don't yet understand, and I break stuff altogether. All fun experimentation, and I guess I learn mostly by breaking stuff...anyway, I thought I'd ask ahead of time and maybe spare myself some time. Thanks! Dan
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/24/11 09:52 PM (14 years ago)
Hi in Louisville: This could be easy or tough, depending on your perspective. It sounds like you're up to hacking around a bit so it should be easy. I would keep an image on the home screen but make it smaller and ignore the image from your control panel. Instead, use an image you drag in your project. I think this approach is best because it will allow you to get a little comfy with how it's put together without having to do major hacking. Then...if you want, you could extend these ideas. The idea would be this: a) Add an image to your Eclipse project after downloading your source code. Drag this .png image into the /res/drawable folder will all the other images. Make this image the size you want on the home-screen. Lets say 320 x 50 (same with, not too tall). b) Find the layout file for the home screen. It's in the layout folder. /layout/act_home.xml Look at this file and change two things - the name of the image and the size of the image in the ImageView element. You'll see where it's sized to 320 x 150 now and starts with the default image named app_default (the .png extension is not used in layout files) c) Next, tell the source-code to not overwite the image you set in the .xml file. Find /src/your package name/Act_Home.java The code in this file looks for appImageView in a few places to set the apps image to the default image, then the downloaded image. We want to ignore this. We want to ignore it because you set the image you want to use in the layout.xml file. The easiest way to do this is to just comment out every line that 'sets' the app image. Like, for example in the onCreate method where it sets the default image before downloading... appImageView.setImageBitmap(noImage); becomes //appImageView.setImageBitmap(noImage); We just commented this out to ignore it. This appImageView.setImageBitmap(the image) call is made in several other places, we'll want to comment those out too. Like in the initGUI method: appImageView.setImageBitmap(appImage); becomes //appImageView.setImageBitmap(appImage); Do a search for appImageView.setImage in this file and comment out everywhere it's setting the image. Hope this makes sense and re-post if you get stuck or if this is too confusing for you.
 
danimal
Aspiring developer
Profile
Posts: 8
Reg: Feb 17, 2011
Louisville
380
like
05/25/11 04:17 PM (14 years ago)
David, this sounds totally straightforward and as always I am at a loss for words at your level support. Long live BuzzTouch!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/26/11 12:06 AM (14 years ago)
Thanks for the kind words. Is it d-animal or dan-imal? Dig the guitar ;-)
 
danimal
Aspiring developer
Profile
Posts: 8
Reg: Feb 17, 2011
Louisville
380
like
05/26/11 04:52 AM (14 years ago)
dan-imal. Thanks, that's a 7 string Russian guitar I picked up cheap, date on label inside is 1953. I used Google Translator to decipher some of the Russian language - being a player and something of a collector I was interested to see who made it. The answer made me slap my forehead - Russia made it of course! In 1953 all Russian guitars were manufactured in the state-run guitar factory, there was no private industry. Your instructions were almost perfect, and took me about one minute to execute. I then discovered that the value used for top margin in act_home.xml made the menu list contents sit too low even after I eliminated the image - so I changed it from 400 or whatever it was to 40 and it's perfect now. Then I began to see all the other values in act_home and act_global_list, list_menu_style, global_title_dark, etc. and went crazy - with a little photoshopping of images found in drawables folder plus changes to the parameters I found in these files I am now able to make the app look just about any way I'd want. Thanks again!!!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/26/11 11:17 AM (14 years ago)
Sounds like good discoveries with the layout stuff. Cool. I spent 10 years in my previous life working as an auto-mechanic. I'll never forget the day a dude showed up on a tow-truck with his Russian car on the back. We figured out what the problem was and he assured me he had the parts to fix it. I couldn't beleive it. Why, how could you have the parts to a Russion car in California? He laughed as he opened the trunk and showed me literally hundreds of parts. LIke a replacement for everything you could image. Trunk wasn't much use for hauling anything because it was full of spare parts - all brand new. I asked him where he got them. He said all new cars built in Russia (then the Soviet Union) came with new replacement parts in the trunk. The catch was, if you're car broke, and you used a part form the trunk, it was impossible to get a new part unless you traded your buddy for it from his trunk. Car parts were like gold in his town because NO NEW PARTS were every issued - ever. Something tells me the locks on the car trunks were bigger than the locks on the houses!! Good stuff.
 
danimal
Aspiring developer
Profile
Posts: 8
Reg: Feb 17, 2011
Louisville
380
like
05/27/11 05:05 PM (14 years ago)
That's a great story! I used to wonder how the infamous Russian Mafia could be so big and powerful in a totalitarian state like the USSR, but as I learned more and more about how desperation breeds crime it made sense - they probably got their start stripping cars! OK now that my app is all pimped out I gotta get back to working on how to make admob work...I haven't the slightest idea what I'm doing but its the most fun I've had in years!
 

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.