Default Layout for ArrayAdapter

I am currently using an array adapter. All the examples I came across on the Internet use a separate layout for the array adapter. I wanted to know if it had a default layout. My code is something like this

ArrayAdapter<String> adapt = new ArrayAdapter<String>(this,,item); 

What should the second parameter do so that I do not specify the layout of the resource and it uses it by default?

+7
source share
1 answer

You can use the defalut one TextView line item:

 android.R.layout.simple_list_item_1 

So:

  ArrayAdapter<String> adapt = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items) 
+16
source

All Articles