android - Casting ListAdapter to RecyclerView.Adapter fails -
i have recyclerview.adapter
class , want cast listadapter
returns error: "can not cast".
public void setadapter() { recycleradapter adapter = new recycleradapter(context); listview.setadapter((listadapter) adapter); }
recyclerview.adapter
directly extends object
therefore, you're going error. besides, don't think can use recyclerview adapter in listview anyways.
Comments
Post a Comment