Iterating the views of a ListView

  • Replies:1
  • OpenNot stickiedUnanswered
  • Forum posts: 9

Mar 10, 2019, 6:56:22 PM via Website

I have a ListView to which I have bound an array adapter.

android:id="@+id/Listview"
android:layout_height="wrap_content"
android:scrollbars="horizontal"
android:drawSelectorOnTop="true"
android:textFontWeight="10"
android:fontFamily="Footlight MT"
android:background="@drawable/bg_key"
android:layout_width="match_parent">

    ArrayAdapter<String> arrayAdapter;

ListView lview = null;
lview = (ListView) findViewById(R.id.Listview);
arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, todo_list);
lview.setAdapter(arrayAdapter);

The listview displays a single column of values. I need to set each row of the ListView a different color. I tried a number of links. I think I need to get each view of the Listview and set the color. Can someone please tell me how I can do this?

Reply
  • Forum posts: 9

Mar 25, 2019, 7:05:06 PM via Website

Hi, is there any updates on this?

Helpful?
Reply