Product flavors

suggest change

Android 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents