I have a model
List<Integer> products = new ArrayList<Integer>(); And getters and setters are written to it:
public List<Integer> getProducts() { return products; } public void setProducts (List<Integer> products ) { this.products = products ; } The task is to display the data of this list in my activation.
For example, to make a similar for the name field, which I also use from the model, I did the following: 1. Created a field in xml
<TextView android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" /> 2. Announced in activation:
TextView name; then find this item
TextView name = (TextView) findViewById(R.id.name); And display it in the activit:
name.setText(model.getName());
объявить? Something tells me that you have some kind of your own, and not a generally accepted definition of this concept. Because of this, the question becomes incomprehensible. - post_zeewname.setText(model.getProducts());should arrange. - Sergey Gornostaev