ArrayAdapter..any解決方案retrive項目,我得到的錯誤,而從ArrayAdapter我遇到錯誤時從該
ArrayAdapter<String> adapter = new ArrayAdapter<>(InboxActivity.this,android.R.layout.simple_list_item_1,usersList);
inbox_listview.setAdapter(adapter);
inbox_listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SMSData sms = (SMSData)getListAdaptr().getItem(position);
Toast.makeText(getApplicationContext(),sms.getBody(), Toast.LENGTH_LONG).show();
}
});
請指定您的錯誤或問題兄弟。 –
我在以下行發生錯誤SMSData sms =(SMSData)** getListAdaptr()**。getItem(position); –
Logcat,stacktrace - 或者其他...! – JimmyB