Product flavors
suggest changeAndroid extensions also work with multiple Android Product Flavors. For example if we have flavors in build.gradle
like so:
android {
productFlavors { paid { … } free { … } }
}
And for example, only the free flavor has a buy button:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width=“match_parent” android:layout_height=“match_parent”>
</LinearLayout>
We can bind to the flavor specifically:
import kotlinx.android.synthetic.free.main_activity.buy_button
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents