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 ArrayAdapter<String>(this,
R.layout.textviewlayout);
// Find and set up the ListView for newly discovered devices
ListView newDevicesListView = (ListView)
findViewById(R.id.new_devices);
// TextView newDevicesListView = (TextView)
findViewById(R.id.title_paired_devices);
newDevicesListView.setAdapter(mNewDevicesArrayAdapter);
now when i try to set the arrayadapter for a list view, it says that
the arrayadapter requires a textview, and this message appear asking
to assign an ID for the textView though the ID is assigned, so i did
is i put the textview in a separate file, however the arrayadapter is
still assigned to a list view...when i try to assign it to a textview,
the method setAdapter won't be in the list of the methods supported by
the textview element.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en