incompatible types: HomeFragment cannot be converted to Fragment in Android

后端 未结 9 1686
轻奢々
轻奢々 2020-12-01 15:57

I\'m getting an error in this part of code:

private void displayView(int position) {
    // update the main content by replacing fragments
    Fragment fragm         


        
9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-01 16:18

    you just have to import android.support.v4.app.Fragment; in the all the FragmentClass();. that's it.

提交回复
热议问题