Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot be cast to android.widget.BaseAdapter #166

Open
SmoothCoffe opened this issue Feb 23, 2018 · 0 comments
Open

cannot be cast to android.widget.BaseAdapter #166

SmoothCoffe opened this issue Feb 23, 2018 · 0 comments

Comments

@SmoothCoffe
Copy link

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); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant