Fragment not attached to a context

前端 未结 7 1262
鱼传尺愫
鱼传尺愫 2020-12-14 14:58

In activity in Toolbar I got a button which need to call method from fragment and update list in that fragment. Now it is an error. Calling in activity

@Over         


        
7条回答
  •  难免孤独
    2020-12-14 15:43

    Kotlin:

    My problem happened with getString()

    Changing it to context.getString() solved it

提交回复
热议问题