listView = (ListView)findViewById(R.id.listView); listAdapter = new ArrayAdapter<String>( this, android.R.layout.simple_list_item_1, android.R.id.text1, contatos); layout da célula id do TextView
listView = (ListView)findViewById(R.id.listView); listAdapter = new ArrayAdapter<String>( this, android.R.layout.simple_list_item_1, android.R.id.text1, contatos); layout da célula id do TextView modelo
listView = (ListView)findViewById(R.id.listView); listAdapter = new ArrayAdapter<String>( this, android.R.layout.simple_list_item_1, android.R.id.text1, contatos); layout da célula id do TextView modelo listView.setAdapter(listAdapter);
inflater.inflate(android.R.layout.simple_list_item_2, null); text1 text2 TextView text1 = TextView text2 = if (view == null) { if só é executado durante a criação inicial de células (TextView)view.findViewById(android.R.id.text1); (TextView)view.findViewById(android.R.id.text2); } .setText(contato.getNome()); .setText(contato.getTelefone());
inflater.inflate(android.R.layout.simple_list_item_2, null); text1 text2 TextView text1 = TextView text2 = if (view == null) { if só é executado durante a criação inicial de células sempre é executado (TextView)view.findViewById(android.R.id.text1); (TextView)view.findViewById(android.R.id.text2); } .setText(contato.getNome()); .setText(contato.getTelefone());