How to reference the current or main activity from another class

后端 未结 13 820
难免孤独
难免孤独 2021-01-30 12:39

I often find myself needing to access methods that require referencing some activity. For example, to use getWindowManager, I need to access some Activity. But ofte

13条回答
  •  心在旅途
    2021-01-30 13:06

    I think this is the solution to this, you get your context static and then reference it statically.

提交回复
热议问题