• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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?
    Bookmark Topic Watch Topic
  • New Topic