Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Discussion > Android Applications

Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.



Reply
 
LinkBack Thread Tools
Old February 7th, 2012, 12:05 AM   #1 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 14
 
Device(s):
Thanks: 0
Thanked 1 Time in 1 Post
Default Am I developing this application correctly?

I couldn't find a specific support forum here, I'm hoping I posted this in the right place and someone can help me.

Right now I have an Android application I made and it has a list of items I can select. The list of items is displayed from an array of Strings and I use a case switch to check which one was clicked. This is very bad because it's a case switch which checks the ID of the clicked item and there are 180 items. So if you add another item somewhere in the middle, you have to manually change the subsequent case switch ID to be increased by one. Know what I mean? Is there a better way to find out which one has been pressed so an action can be associated to it?

Also on the same application, clicking a menu item displays information about that item including a photo and some text details. Every detail page is the same except for the content but right now I have a separate .java file for each page and also a separate .xml file for the layout of each page. Each .java file calls its own .xml file and each .xml file calls its own photo image and String for the details. So this means I have 180 .java files, 180 .xml files and 180 .png images.

Is there a better way to dynamically create these so I don't have so many files? Thanks everyone.

Deemar is offline  
Reply With Quote
Sponsors
Old February 7th, 2012, 12:17 AM   #2 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,090
 
Device(s): GalaxyNexus(LTE), NexusOne, OG Droid, GalaxyTab 10.1(LTE), Eris, Logitech Revue (fishtank)
Thanks: 4,164
Thanked 3,126 Times in 1,292 Posts
Default

our app dev forum is here:

Application Development - Android Forums


Are you using a ListView?
alostpacket is offline  
Reply With Quote
Old February 7th, 2012, 03:08 AM   #3 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 14
 
Device(s):
Thanks: 0
Thanked 1 Time in 1 Post
Default

thanks
Deemar is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Discussion > Android Applications User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 01:55 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo