I have a custom ListView adapter that uses multiple layout types. One is the built-in type here:
v = inflater.inflate(android.R.layout.simple_list_item_1, null);
How do I access the TextView on that layout? What is the ID?
TextView txt1 = (TextView) v.findViewById(***WHAT IS THE ID***);
txt1.setText("foo");
And if you know the ID, how did you find it?
It is
@android:id/text1So you need to modify your code like this
Found here https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/simple_list_item_1.xml
Source code is your best friend!