wood burning stoves 2.0
The moose likes Android and the fly likes Creating a table with user data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Creating a table with user data" Watch "Creating a table with user data" New topic

Creating a table with user data

Patrick Mahoney

Joined: Aug 12, 2011
Posts: 3
I've been working on my first app and I recently figured out how to get and use user data throughout my classes and activities. My question now is how to create some kind of a table to display and manipulate the data with.

Here's the main page of the app:

What I want to do is create a table underneath the line, and add an entry every time a user clicks the new saving category button. When they click that button, they are prompted for a name and a percent via an EditText and a SeekBar:

I want that stuff to get displayed here:

If it's hard to read sorry, it was done in paint. Basically I want a new row that will display the user-defined name on the left, and on the right it will display a percentage of the user defined paycheck. On the left I want the name of the category, and on the right it will say $0 until the user makes a new paycheck, after that it will display a percentage of that paycheck.

I have no idea how to start doing this, so any help is greatly appreciated.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
List data is generally displayed in a <ListView>. Each row of a list can be set up to have its own layout (for example, to keep the two columns apart). If the row layout is named row.xml, you'd do something like

listView.setAdapter(new ArrayAdapter<String>(this, R.layout.row, results))

assuming that "results" contains the data to be displayed. This should help: http://stackoverflow.com/questions/2432951/how-to-display-a-two-column-listview-in-android
I agree. Here's the link: http://aspose.com/file-tools
subject: Creating a table with user data
It's not a secret anymore!