2

I have project with simple following structure:

Project structure

As you can see the mylibrary module has auto generated a res folder. How I can get acess from some mylibrary code to resources? Does libraries have their own context? What mechanism is used to acсess resources that are located in library res folder from it's code? Is it possible?

1
  • 2
    you need any Context, and then you can access any resources. Just pass Context from the app to the library Commented Jan 18, 2018 at 8:31

1 Answer 1

2

Library resources are merged with the app resources (example: AppCompat) when compiled into the APK.

Just access it like any other resource.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.