getChildFragmentManager () cannot be resolved or cannot be referenced

前端 未结 5 2098
夕颜
夕颜 2020-12-06 11:41

I know, there are many forum posts on this topic already, but none did solve my issue

My code looks like this:

private SectionsPager         


        
5条回答
  •  情书的邮戳
    2020-12-06 12:27

    getChildFragmentManager() is a method of a Fragment. Since you are subclassing AppCompatActivity, you can't access it. If you are using the Fragment from the support library you can use getSupportFragmentManager()

提交回复
热议问题