Discussion Forums  >  Uncategorized

Replies: 9    Views: 312

appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
03/02/11 12:34 PM (14 years ago)

main/header image file v1.4 location

In V1.4 I'm trying to locate the main image within either the source files or the finalised app. I can find the icon.png but not the main image... am I going mad? What I'd like to do is replace it with a larger image for use on android tablets, does anyone know if this is possible? Any help appreciated
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/02/11 01:39 PM (14 years ago)
Hi in UK. Because v1.4 uses a home-screen with a header image, I'm assuming you're talking about the image on the main menu. This is also the image that you configure when using the 'Apps main image' setting in the control panel. v1.4 is far less flexible that v1.5 but does offer Android support, which is probably why you're looking at this approach. Sigh... can't wait to get v1.5 Android Edition done! Anyway, in the Objective-C source code, this image is used in the AppViewController.m file (for iOS). This file is in the Screen_Controllers/Application folder in Xcode. For Android, the image is used in Act_Home.java, this file is in the /src directory in Eclipse. The layout of the image for Android is setup in the layout file called act_home.xml in the / layout folder. So... that's were this image is used. But, if you explore these source files, you'll see that the size of the image is pre-set. This means you'll have a hard time creating the logic necessary to change the image for different devices. Can it be done, sure, it would just take some programming skill. Not sure how else to answer, hope this helps.
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/02/11 02:16 PM (14 years ago)
Hi David Thanks for the quick reply. Your assumptions are correct. So am I right in thinking if I change these android:layout_width=320dip android:layout_height=150dip this will adjust the size of the image? I can't wait for android 1.5 either. Keep up the good work!
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/02/11 02:23 PM (14 years ago)
also where is the actual image file stored?
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/02/11 02:36 PM (14 years ago)
no need to reply about the sizing, I tried it and it worked. But where is the image file itself?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/02/11 02:48 PM (14 years ago)
The app is setup to download the image from your buzztouch control panel. This allows you to update it online. I'm thinking you could just drag the image into the drawable directory in Eclipse, then modify the code to use the same image everytime. This would keep you from being able to update it but should work. To do this, you'll need to sort through Act_Home.java and find the downloadImage method (not sure of the syntax, not looking at it). Next, you'll need to hard-code the location of the image in the layout.xml file for the home screen. Again, sytax is tough from memory. Maybe google Android ImageView layout for the syntax.
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/02/11 03:02 PM (14 years ago)
All sounds good. I'll give it a go. Thanks again
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/02/11 04:36 PM (14 years ago)
I'm still struggling with this. I have managed to get my image to load as the default but how do I stop the app from downloading the image in my control panel?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/02/11 06:04 PM (14 years ago)
OK, do this: a) Find Act_Home.java, we need to make two adjustments to this file b) In Act_Home.java, find this line: Bitmap noImage = BitmapFactory.decodeResource(getResources(),R.drawable.app_default); Change this to point the image you added to the Drawable directory, like: R.drawable.myNewImage); This will change the image that shows when the screen loads. c) Next, to prevent the app from downloading the image... scroll down about 1/4 of the way through the code and find this comment: //configure downloader for image Directly below that comment, you'll see the downloader object we setup to fetch the app's image. Comment this out. This means you'll be commenting out the next 6 lines. The last line you comment out should be downloaderThread.start() That should work. downloadThread
 
appsolutely
Aspiring developer
Profile
Posts: 72
Reg: Jan 05, 2011
UK
10,070
like
03/03/11 02:19 AM (14 years ago)
Aha, I thought I was close. Just the downloader bit I was missing. I'll try this later. Thanks David, you're a legend!
 

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.