When and why should one use getResources()?

后端 未结 3 579
失恋的感觉
失恋的感觉 2021-02-03 13:45

I\'m just getting started with Android dev and playing around.

The documentation for getResources() says that it will [r]eturn a Resources instance for your applic

3条回答
  •  青春惊慌失措
    2021-02-03 14:24

    It will be useful in non_activity classes.

    You will pass the context to the class and from that you can access the resources.

提交回复
热议问题