textViewResourceId is an identifier for a specific layout. To refer to this identifier, you use the R.layout format. *.
R.layout. * are the layouts you created in the res / layout folder. Therefore, if you have an xml layout file in the res / layout / folder folder called "my_list_item.xml" of any layout format you want, you can use it as your textViewResourceId (not necessarily TextView).
If you do not want to create your own layout, you can use the built-in layouts found in your android-sdk directory (in my case its C: \ Android \ android-sdk \ platform \ android-8 \ Data \ Res \ layout). You reference these inline layouts via android.R.layout. * (Notification I started with "android"). Therefore, if I want to use the built-in simple_list_item_1.xml file, I can reference this using the android.R.layout.simple_list_item_1 file.
R.layout. * <--- own layout
android.R.layout. * <--- built-in Android layouts
Some popular layouts:
android.R.simple_list_item_1
simple_list_item_2.xml
and etc.
source share