Can't get Action Bar in fragment class

后端 未结 5 376
深忆病人
深忆病人 2020-12-15 16:11

I have an activity with three fragment classes inside it. I get an error when trying to change the action bar title from inside of them. If I try to make the classes just pu

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 16:35

    A static class cannot see private fields of another class. You will need to use getActivity().getActionBar() to retrieve it.

提交回复
热议问题