Discussion Forums  >  Uncategorized

Replies: 1    Views: 208

slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
08/13/11 01:02 AM (14 years ago)

Really cool idea, need some help with the java

Ok Here is my idea. I want to pre set the header image so that it is static, Then make an if statement in ACT_HOME.java that if the file is called banner.jpg it will not show the file and will display the static image, Then have another if statement so that if the image available for download is called anything else it will download it and overlay the image like normal. I have already resized the header and taken off the rounding attribute and put my static image in, I just need help with the code here. What should I do to make this happen? //set properties for current app appDelegate.currentApp.setName(appVars.getString(name)); appDelegate.currentApp.setVersion(appVars.getString(version)); appDelegate.currentApp.setImageName(appVars.getString(imageName)); appDelegate.currentApp.setImageUrl(appVars.getString(imageUrl)); appDelegate.currentApp.setModifiedUTC(appVars.getString(modifiedUTC)); //load or download image.. if(appDelegate.fileExists(appVars.getString(imageName))){ appImage = appDelegate.getLocalImage(appVars.getString(imageName)); if(appImage != null){ appDelegate.currentApp.setImage(appImage); appImage = appDelegate.roundImage(appImage, 0); appImageView.setImageBitmap(appImage); hideProgress(); }else{ showAlert(Image Load Error,There was a problem loading a saved image?); } }else{ //Log.i(ZZ, thisActivityName + :initGUI:imageDoesNotExist); //configure downloader for image downloadThread = new DownloadThread(); downloadThread.setDownloadURL(appVars.getString(imageUrl)); downloadThread.setSaveAsFileName(appVars.getString(imageName)); downloadThread.setDownloadType(image); downloadThread.setThreadRunning(true); downloadThread.start();
 
slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
like
08/13/11 02:12 AM (14 years ago)
If the server changes the image names to random vars then this obviously wont work, but if it deletes old file and keeps new files name then its possible and could be usefull. Say you wanted to let all your users know you had a new app out.. make an image add for and and post it there.. instant add! If its not possible because of server file upload would someone mind telling me what to change to make it stop downloading the image file and just show the static one? I want to do this because the image quality is higher since its not hosted off of the web (72dpi) where I will use 300dpi for the static image..
 

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.