Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Build a Projeto class in order to model your objects:</p> <pre><code>public class Projeto { private long idProjeto; private String data; private String cliente; private String tipoProjeto; private String status; public Projeto() { super(); } public Projeto(long idProjeto, String data, String cliente, String tipoProjeto, String status) { super(); this.idProjeto = idProjeto; this.data = data; this.cliente = cliente; this.tipoProjeto = tipoProjeto; this.status = status; } public long getIdProjeto() { return idProjeto; } public void setIdProjeto(long idProjeto) { this.idProjeto = idProjeto; } public String getData() { return data; } public void setData(String data) { this.data = data; } public String getCliente() { return cliente; } public void setCliente(String cliente) { this.cliente = cliente; } public String getTipoProjeto() { return tipoProjeto; } public void setTipoProjeto(String tipoProjeto) { this.tipoProjeto = tipoProjeto; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } } </code></pre> <p>Then in your adapter take the idProjeto field as the id, so it will be passed to the onitemclicklistener as the id parameter:</p> <pre><code>public class ProjetoAdapter extends ArrayAdapter&lt;Projeto&gt; { public ProjetoAdapter(Context context, int resource, int textViewResourceId, List&lt;Projeto&gt; objects) { super(context, resource, textViewResourceId, objects); } public ProjetoAdapter(Context context, int resource, int textViewResourceId, Projeto[] objects) { super(context, resource, textViewResourceId, objects); } public ProjetoAdapter(Context context, int resource, int textViewResourceId) { super(context, resource, textViewResourceId); } public ProjetoAdapter(Context context, int resource, List&lt;Projeto&gt; objects) { super(context, resource, objects); } public ProjetoAdapter(Context context, int resource, Projeto[] objects) { super(context, resource, objects); } public ProjetoAdapter(Context context, int resource) { super(context, resource); } @Override public long getItemId(int position) { return this.getItem(position).getIdProjeto(); } // Other methods that you want to override } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload