I have an app with a base brand and multiple whitelabel brands along with multiple server targets. In my app's build.gradle,the flavors are defined as:
flavorDimensions("server", "whitelabel")
In my src/main/res/drawable
I have a logo.xml VectorDrawable for the base brand and it is overwritten in src/whitelabel1/res/drawable
.
When my app's build.config contains vectorDrawables.useSupportLibrary = true
the correct logo.xml is used in my ImageView. If I remove useSupportLibrary
the ImageView renders logo.xml from main
even in the apk for Whitelabel1
<ImageView
android:id="@+id/imageLogo"
android:layout_width="@dimen/viewXS"
android:layout_height="wrap_content"
android:layout_margin="@dimen/marginXS"
android:adjustViewBounds="true"
android:padding="@dimen/marginXS"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_logo" />
It happened with me as well. only after writing this vectorDrawables.useSupportLibrary = true inside defaultconfig. vector resources was picked from the flavor source set folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With