MaterialDrawer v8.0.0-a01 Release Notes

Release Date: 2019-11-03 // over 4 years ago
  • โš  Warning

    • ๐Ÿš€ This release contains a big amount of breaking changes, and will introduce an all new API to set-up the drawer.
    • ๐Ÿš€ This is an alpha release and will most likely still receiver further breaking API changes. In addition it still contains Drawer. MiniDrawer, AccountHeader classes which will be removed as soon as we reach a stable API.
    • ๐Ÿ“š As a result of the updated API the main purpose of this library is to provide the Slider-View which is used within the DrawerLayout. The DrawerLayout should be used as specified and documented in its documentation.
    • ๐Ÿ“š The drawer no longer automatically manages the ActionBarDrawerToggle refer to standard DrawerLayout documentation on how to set-up

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿšš Drawer, AccountHeader classes will be removed
    • The drawer is no longer set-up via code only, it requires now a specification in the layouts
    • ๐Ÿ“š Documentation is not yet updated (this will happen as soon as all samples are upgraded and working again)

    (New) How to use

    1.) Define DrawerLayout and the SliderView in the xml

    \<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:id="@+id/root"android:layout\_width="match\_parent"android:layout\_height="match\_parent"android:fitsSystemWindows="true"\> \<androidx.constraintlayout.widget.ConstraintLayout android:layout\_width="match\_parent"android:layout\_height="match\_parent"android:gravity="center"\> \<!-- CONTENT --\> \</androidx.constraintlayout.widget.ConstraintLayout\> \<com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView android:id="@+id/slider"android:layout\_width="wrap\_content"android:layout\_height="match\_parent"android:layout\_gravity="start"android:fitsSystemWindows="true" /\> \</androidx.drawerlayout.widget.DrawerLayout\>
    

    2.) Access view and fill with items

    slider.apply { itemAdapter.add( // define items ) onDrawerItemClickListener = { v, drawerItem, position -\>// listener actionfalse } withSavedInstance(savedInstanceState) }
    

    ๐Ÿ‘€ 3.) Please see the sample application for more samples on how to use the new version

    Feedback welcome

    • The current state is super early alpha and APIs are about a change.
    • ๐Ÿ The main goal of this rewrite is to not affect fullscreen flags and fitsSystemWindows flags. Full control is on the developers side. The library should automatically detect insets and work as a transparent view as slider inside the DrawerLayout