03-22 06:23:21.295: E/AndroidRuntime(1941):
java.lang.IllegalStateException: ArrayAdapter requires the resource ID
to be a TextView
the problem is in this couple of lines:
mNewDevicesArrayAdapter = new ArrayAdapterString(this,
R.layout.textviewlayout);
// Find and set up the
Did you bother to look at the documentation? An ArrayAdapter constructor
takes more than just one argument... One of them happens to be the id of a
text view:
http://developer.android.com/reference/android/widget/ArrayAdapter.html#ArrayAdapter%28android.content.Context,%20int%29
Thanks,
Justin
Sorry... Didn't notice your ArrayAdapter constructor... You have more the
correct NUMBER of arguments, but you are specifying the layout... not the
id of the textview.
If your textview looks like this:
textView android:id=@+id/my_textView /
then the second parameter in your constructor should
3 matches
Mail list logo