0

We are creating this Bar machine where the machine is hooked up to a server. From a client (in our case an Android application), you can mix your drink.

Problem is that we started out with 4 different liquids. But if we want the project to be more dynamic, we want to be able to have more or less than 4 liquids in the machine.

In our app we have for each liquid a Seekbar and textviews for displaying fluid name and volume while dragging the Seekbar.

The app client receives fluid information from the server.

If we wish to have let's say 5 fluids, can I somehow add more seekbars and textviews from the code? I'm having difficulty seeing that, because with 4 liquids all Views are made in the xml-file with RelativeLayouts.

Have searched for it but have only seen ListViews but my UI is more complicated than plain textviews.

1 Answers1

0

ListView use an ListAdapter that you have to implement, the ListAdapter can be used for anything (not only TextView).

Android ListView

If you want to add a view to a ViewGroup (LinearLayout, RelativeLayout, ...), you can also use :

BenC
  • 8,379
  • 3
  • 48
  • 67
Blusky
  • 3,113
  • 1
  • 17
  • 35