From b28fc2424bef2de3c66dcfb4415138ed357a8a31 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Thu, 7 Jul 2016 18:25:05 +0200 Subject: [PATCH] * update to FastAdapter v1.6.0 * implement `isAutoExpanding` from FastAdapter v1.6.0 --- library/build.gradle | 2 +- .../materialdrawer/model/AbstractDrawerItem.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/library/build.gradle b/library/build.gradle index c21d51fca..c3c535e3f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -47,5 +47,5 @@ dependencies { // used to fill the RecyclerView with the DrawerItems // and provides single and multi selection, expandable items // https://github.com/mikepenz/FastAdapter - compile 'com.mikepenz:fastadapter:1.5.8@aar' + compile 'com.mikepenz:fastadapter:1.6.0@aar' } diff --git a/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.java b/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.java index 27b176884..86d1a08ac 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.java +++ b/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.java @@ -243,6 +243,17 @@ public boolean isExpanded() { return mExpanded; } + + /** + * overwrite this method and return true if the item should auto expand on click, false if you want to disable this + * + * @return true if this item should auto expand in the adapter + */ + @Override + public boolean isAutoExpanding() { + return true; + } + /** * the abstract method to retrieve the ViewHolder factory * The ViewHolder factory implementation should look like (see the commented code above)