In my application, I have a listView that displays the database information, I want when loading the listView the String of one of the TextViews is replaced by an image. According to the text presented, a different image will appear. Can you do that and what would it be like?
The code is just to represent what I want in the application because it does not work!
switch (textView1.getText()) {
case textView1.getText("carro") ;
textView1.setBackground(R.drawable.image1);
break;
case textView2.getText("moto") ;
textView2.setBackground(R.drawable.image2);
break;
case textView3.getText("caminhao") ;
textView3.setBackground(R.drawable.image3);
break;