• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris

Reading and Writing from multiple Lists: Better way to write my code?

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written an Android App that pulls lots of data from Random Lists. (For inspiring Authors and Gamers).
Categories are Names (male/female, plus surname), Furniture (Kitchen, bathroom, Lounge, Bedroom, plus material), Quests (You must <activity> the <descriptor><maguffin> before <time limit>)
The lists are defined in XML String-Arrays.

I have added a feature to allow users to add their own custom data to each list, which I store in  CSV Files.

Currently, each category has its own separate Add Data Activity and Layout. This seems to be leading to long, messy code.
e.g. if "Add Data to Quests Lists" is chosen, the user is presented with "Add activity", "Add descriptor" and "Add Maguffin" boxes.
"Add data to Names Lists presents "Add Male Name", "Add Female name" and "Add Surname" options.

Is there a way to put all of the Add Data actions into one Activity/Layout, and still have it filtered by Category?
Good heavens! What have you done! Here, try to fix it with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
    Bookmark Topic Watch Topic
  • New Topic