How do I instantiate a class in android which is also an activity?

前端 未结 4 542
深忆病人
深忆病人 2021-01-29 00:39

In android, how can I create a constructor for a class which is also an Activity?

My problem is,

I want to have two activity cl

4条回答
  •  半阙折子戏
    2021-01-29 01:16

    I tried to instantiate Activity inside itself to pass it to a method of another class. I got OutOfMemoryError. So I had that method inside Activity itself and passed it as this object.

提交回复
热议问题