display a field from a related table in a ListView
<p>I am Brazilian forgive me for the mistakes of English. And if not here is the best place for it. But just need a help and I believe that is not too complex.</p>

<p>I have a table "Customers" and a "Addresses". I created a list where I display the customer names, and now need to display along with the customer name his address also looking at the code address. I've tried various alternatives but all without success. Follow the Adapter of my wish list:</p>

<pre><code>@Override
public View getView(int arg0, View arg1, ViewGroup arg2) {

    // populando o objeto
    contribuinte = contribuintes.get(arg0);
    endereco = aguaApp.getDataManager().buscarEnd(contribuinte.getCod_endereco());

    LayoutInflater inflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout.modelo_arrow, null);

    txtNome = (TextView) view.findViewById(R.id.tvNomePro);
    txtEndereco = (TextView) view.findViewById(R.id.tvEndPro);

    if (contribuinte.getAno() == 0) {

        txtNome.setText(contribuinte.getNome_proprietario());
        //txtEndereco.setText(endereco.getNome());
        //txtEndereco.setText(Long.toString(contribuinte.getCod_endereco()));

    } else {

        txtNome.setText(contribuinte.getNome_proprietario());
        //txtEndereco.setText(endereco.getNome());
        // txtEndereco.setText(Long.toString(contribuinte.getCod_endereco()));

        txtNome.setTextColor(Color.RED);
        txtEndereco.setTextColor(Color.RED);
    }

    return view;
}
</code></pre>

<p>And here the method that populates my list and sends it to the Adapter:</p>

<pre><code>    public void mostraLista() {

    List&lt;Endereco&gt; enderecolista = null;

    aguaApp = (AguaApp) getApplication();
    contribuintelista = new ArrayList&lt;ContribuinteJson&gt;();
    enderecolista = new ArrayList&lt;Endereco&gt;();

    contribuintelista = aguaApp.getDataManager().buscaContribuinte();
    //enderecolista = aguaApp.getDataManager().getEnderecoList();

    setListAdapter(new ContribuinteAdapter(this, contribuintelista));
}
</code></pre>

<p>As I said, the name of my client I can exiber, what I want now is to display the customer name and address, and address this in another table.</p>

<p>I very much appreciate if someone can help me, and I apologize for any mistake of mine.</p>
