Search code examples
androidandroid-5.0-lollipopandroid-support-libraryandroid-coordinatorlayout

Use CoordinatorLayout or equivalent framework widget with minSdkVersion 21


I'm going to create an application with minSdkVersion 21. I removed all support libraries but I can't find anything equivalent of android.support.design.widget.CoordinatorLayout. Shoud I activate the design library even knowing that it will be never installed on devices with api which is lower than 21?


Solution

  • Shoud I activate the design library even knowing that it will be never installed on devices with api which is lower than 21?

    If you want to use CoordinatorLayout, yes. Moreover, AFAIK, that will require you to fully implement appcompat-v7 (e.g., inherit from AppCompatActivity, use a Theme.AppCompat-based theme).

    Eventually, perhaps someone will forward-port elements out of this library to work without the appcompat-v7 dependency.