You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have cursor that retrieve data from database and display it in ListView
get this Error when i try to Display in SwipeMenuListView
this is the error
java.lang.ClassCastException: com.baoyz.swipemenulistview.SwipeMenuListView$1 cannot be cast to android.widget.BaseAdapter
this is my code
public void populateListView() { Cursor cursor = myDB.searchname(null); String[] fromFieldNames = new String[]{DataBaseAdapter.KEY_ROWID, DataBaseAdapter.KEY_NAME, DataBaseAdapter.KEY_DATE}; int[] toviewIDs = new int[]{R.id.textViewpnumber, R.id.textViewpname, R.id.textViewdate}; mycursoradapter = new SimpleCursorAdapter(this, R.layout.item_layout, cursor, fromFieldNames, toviewIDs, 0); mylist = findViewById(R.id.Listtest); mylist.setAdapter(mycursoradapter); mylist.setFastScrollEnabled(true); mylist.setTextFilterEnabled(true); }
The text was updated successfully, but these errors were encountered:
i have cursor that retrieve data from database and display it in ListView
get this Error when i try to Display in SwipeMenuListView
this is the error
java.lang.ClassCastException: com.baoyz.swipemenulistview.SwipeMenuListView$1 cannot be cast to android.widget.BaseAdapter
this is my code
public void populateListView() { Cursor cursor = myDB.searchname(null); String[] fromFieldNames = new String[]{DataBaseAdapter.KEY_ROWID, DataBaseAdapter.KEY_NAME, DataBaseAdapter.KEY_DATE}; int[] toviewIDs = new int[]{R.id.textViewpnumber, R.id.textViewpname, R.id.textViewdate}; mycursoradapter = new SimpleCursorAdapter(this, R.layout.item_layout, cursor, fromFieldNames, toviewIDs, 0); mylist = findViewById(R.id.Listtest); mylist.setAdapter(mycursoradapter); mylist.setFastScrollEnabled(true); mylist.setTextFilterEnabled(true); }
The text was updated successfully, but these errors were encountered: