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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -