Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ListView tools:listitem not working in android studio 2.2 stable channel

Steps to Reproduce:

  • Open Layout editor
  • Add a ListItem
  • Specify tools:listitem property with a valid row_layout

What should happen:

It should use the layout from tools:listitem to render list items.

Actual result:

Nothing changes, it still shows the default list with generic views

Bug Report

I could see this bug was already filed on Jul 5, 2016 Bug Report Link

Are there any work around available to render list?

like image 642
Dexto Avatar asked Sep 20 '16 09:09

Dexto


2 Answers

One thing to notice: it's tools:listitem not tools:listItem which is somewhat confusing. Took me some time to figure that out, since Android Studio currently doesn't provide autocompletion for that.

like image 157
Radosław Panuszewski Avatar answered Nov 19 '22 17:11

Radosław Panuszewski


You must define an id i.e. android:id="@+id/list_view" to your list

like image 2
Nagaraj Wadakannavar Avatar answered Nov 19 '22 15:11

Nagaraj Wadakannavar