• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps So I need some help making some sort of categorized menu application

newbcake

Lurker
I work in a shop that requires me to make a menu.

I knew how to do this a while back, but I haven't programmed in a good few years, so I don't remember how.

Anyway, this is what I need to do, and can someone help me find tutorials on how to go about this?

You open the app, and are listed with some options.

Sort "Products" by

  • Flavor
  • Ratio
  • Brand
  • RANDOM*
Basically, each one takes you to another sub-page, i.e.:

Flavor will list a bunch of flavors, such as

Fruity, Tobacoo, Menthol, etc.

The other categories follow the same story, just with that specific category instead.

When entering these categories, the products themselves will be listed in big text boxes, with a picture of the product, the price on the right, and a small description under it.

*As for random, it will pick a random product and take the user to said page.

Each product will be added as an object (I think this is the most efficient way?) that has private variables that have the price, the picture, the name, the description, etc. Possibly, if I remember correctly, something that could work is even getting just one central file hosted somewhere with all this information, and the application will pull that file each time, and fill the menus with said data.

It sounds like a damn simple application, but I cannot wrap my head around exactly where to start.

Any pointers?
 
Sounds like a good idea.
Where do you start? Depends how familiar you are with Java and Android development. First get a good grasp of the basics. There are many sample applications in Android Studio (first download and install this). There are a lot tutorials on the web, and also good beginner books.

Start with really simple apps involving only one screen. Some essential things you need to become familiar with in the long run are:-

  • Using the layout designer in Android Studio
  • Using the emulator, or connecting a real device to help with development
  • Running the app in debug mode
  • Using the debugger to set breakpoints
  • How to create and start Activities
  • Using ListView (sounds like your app will be making heavy use of this)
 
Sounds like a good idea.
Where do you start? Depends how familiar you are with Java and Android development. First get a good grasp of the basics. There are many sample applications in Android Studio (first download and install this). There are a lot tutorials on the web, and also good beginner books.

Start with really simple apps involving only one screen. Some essential things you need to become familiar with in the long run are:-

  • Using the layout designer in Android Studio
  • Using the emulator, or connecting a real device to help with development
  • Running the app in debug mode
  • Using the debugger to set breakpoints
  • How to create and start Activities
  • Using ListView (sounds like your app will be making heavy use of this)

I do have some experience. I just need some refreshers on the best way to tackle this catalog. I understand ListView but I'm trying to figure out something.

Is it all memory efficient to have each of these pages an activity?

Activity 1: Options (Flavor, Brand, Random, etc.)
Activity 2: Sort by Flavor
Activity 3: Sort by Brand
Activity 4 (Coming from 2): Flavors filtered by flavors
Activity 5 (Coming from 3): Brands filtered by brand
 
I'm still a bit unclear about what your screens will show, without seeing some sketches. But you know the action bar can be used to display some sort/filter options in a menu. So the user selects the filter type from the menu, and the displayed list gets sorted/filtered accordingly. ListViews are very memory efficient in Android if you use a Custom ListAdapter to recycle the list item views.
 
I'm still a bit unclear about what your screens will show, without seeing some sketches. But you know the action bar can be used to display some sort/filter options in a menu. So the user selects the filter type from the menu, and the displayed list gets sorted/filtered accordingly. ListViews are very memory efficient in Android if you use a Custom ListAdapter to recycle the list item views.

I'll try to draw something up.
cWFRjTK.png


I have something basic done, but I want to do more things like making it easier to add a flavor with maybe just editing an external file rather than open up the source code each time?
 
Seems like a logical workflow there. In terms of adding a new flavour, you could include an 'add' button the middle screen. Clicking this would take you to an edit screen where you could enter the details. Also consider adding a 'delete' icon to each item in the list. Of course you might also want to include an 'edit' icon too.
For persistent storage I'd be using a database for this.
 
Seems like a logical workflow there. In terms of adding a new flavour, you could include an 'add' button the middle screen. Clicking this would take you to an edit screen where you could enter the details. Also consider adding a 'delete' icon to each item in the list. Of course you might also want to include an 'edit' icon too.
For persistent storage I'd be using a database for this.


Something like a JSON file? And I only wanted to developer to add flavors. This is more or less a catalog for products my work place carries, so customers viewing the menu should not be able to add items.
 
Ok in that case an external file would do the job. XML or JSON, whatever you like.
 
Ok in that case an external file would do the job. XML or JSON, whatever you like.
Probably a dumb question, but it is possible to host this json file somewhere so it's easily quickly updateable right? In essence, so I don't have to copy said new file to the tablet for the lists to update, just upload it somewhere?
 
Oh definitely. You could host it on a web server, to be accessible from anywhere. The app then just needs to fire off an HTTP request to get the file content.
 
Ok in that case an external file would do the job. XML or JSON, whatever you like.
. Alright, I been reading about custom list views, and I'm thinking about how to also make it look pretty like

68747470733a2f2f6431337961637572716a676172612e636c6f756466726f6e742e6e65742f75736572732f3132353035362f73637265656e73686f74732f313638393932322f6576656e74732d6d656e755f312d312d362e676966


But for now, I think I understand I'll use something like multi level listviews
 
Back
Top Bottom