tablelayout - Implement Android layout TableView -
I have to represent the data like this:
- How do I apply it?
- Can I give some advice to start with the implementation?
- Do you know any examples that already exist?
Thanks
The problem is that I have There is more than one list and I can only send one list to custom list view.
If you create an adapter constructor, you can pass more than 1 list which accepts more lists in the form of parameters. Something like this:
The public class extends the MyAdapter BaseAdapter {reference reference; & Lt; String & gt; Data1999; & Lt; String & gt; Data2005; & Lt; String & gt; Data2008; Public STHAdapter (reference references, list & lt; string & gt; data9999, list & lt; string & gt; data 2005, list & lt; string & gt; data 2008) {this.context = context; This.data1999 = data1999; This.data2005 = data2005; This.data2008 = data2008; } View GetView (Last integer status, seeviewview, ViewGroup Parent) {... TextView txt1999 = Convertview.findvidi (... yourID); TextView txt2005 = convertView.findViewByID (... your id); TextView txt2008 = convertView.findViewByID (... your id); Txt1999.setText ("+ +" data1999.get (status)); Txt2005.setText ("" + data2005.get (status)); Txt2008.setText ("+ +" data2008.get (status)); }
If you have 3 lists and each list gives you input data for the next year, then in your custom cell, you create 3 text books, which you have for three years Will show.
For each cell, you will populate the text view with the data fetch from the current status. / P>
Comments
Post a Comment