Amir Hossein Mirzaei
Amir Hossein Mirzaei

Reputation: 2375

android how to accsess base module drawables in feture module xml files

i have base module which is library module and the feature module which is my application how can i set the src of the imageView which is in the some layout of the module feature to the drawable file which i have in base module ?

i have tried this code but it gives me resource not found in the build time :

 <ImageView
                    android:src="@com.example.app.base:drawable/image"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

Upvotes: 2

Views: 658

Answers (1)

Veeresh P
Veeresh P

Reputation: 446

One cannot access resources of base_module into library_module. But other way it works fine i.e When you add your library_module dependency into a base_module you can access resources of library_module into base_module.

Upvotes: 1

Related Questions