1
我有問題,當我想在下面使用這些代碼,我在我的代碼中使用recyclerview,但我認爲它的listview任何人都可以幫助我?如何將listview轉換爲recyclerview?
public ListViewSwipeGesture(RecyclerView listView, TouchCallbacks Callbacks, MainListFragment context){
ViewConfiguration vc = ViewConfiguration.get(listView.getContext());
mSlop = vc.getScaledTouchSlop();
mMinFlingVelocity = vc.getScaledMinimumFlingVelocity() * 16;
mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
mListView = listView;
activity = context;
tcallbacks = Callbacks;
SwipeType = Double;
GetResourcesValues();
當我使用:mListview = listview; 我有一個錯誤。 和錯誤是: 錯誤:(103,21)錯誤:不兼容的類型:RecyclerView不能轉換到ListView控件