diff --git a/FAQ.md b/FAQ.md
index 0258b676e..2f6323203 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -8,6 +8,7 @@ Each question and it's answer is hosted in a separate file within the FAQ folder
* [How do I make the drawer appear underneath the Toolbar?](FAQ/howto_show_drawer_under_toolbar.md)
* [How do I create a Multi-pane layout with MaterialDrawer for tablets?](FAQ/howto_show_drawer_in_tablet_multipane.md)
* [Why is there whitespace where the status bar should be while my theme is set as fullscreen ?](FAQ/status_bar_whitespace.md)
+* [How do I change existing or add my own CustomDrawerItems to the MaterialDrawer?](FAQ/howto_modify_add_custom_draweritems.md)
##AccountHeader
diff --git a/FAQ/howto_modify_add_custom_draweritems.md b/FAQ/howto_modify_add_custom_draweritems.md
new file mode 100644
index 000000000..790998867
--- /dev/null
+++ b/FAQ/howto_modify_add_custom_draweritems.md
@@ -0,0 +1,11 @@
+#How do I change existing or add my own CustomDrawerItems to the MaterialDrawer?
+
+Please head over here on how to implement a proper CustomDrawerItem:
+- http://stackoverflow.com/a/32543209/325479
+- http://stackoverflow.com/a/32542999/325479
+
+Or you check out custom drawer item implementations here:
+- https://github.com/mikepenz/MaterialDrawer/tree/develop/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems
+
+You might also find some answers here:
+- https://github.com/mikepenz/MaterialDrawer/issues?utf8=%E2%9C%93&q=CustomDrawerItem
diff --git a/MIGRATION.md b/MIGRATION.md
index 4def3056e..00094b3ff 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -1,5 +1,8 @@
###Upgrade Notes
+#### v5.5.0
+* **Dropping support for API < 14. New MinSdkVersion is 14**
+
#### v5.3.3 -> 5.3.4
* If you use the `FastAdapter` please read the upgrade notes for v1.6.0 (https://github.com/mikepenz/FastAdapter/releases/tag/v1.6.0)
diff --git a/README.md b/README.md
index ac7dd2b30..64307a878 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ You can find some frequently asked questions and other resources in the [WIKI /
##1. Provide the gradle dependency
```gradle
-compile('com.mikepenz:materialdrawer:5.4.0@aar') {
+compile('com.mikepenz:materialdrawer:5.5.0@aar') {
transitive = true
}
```
@@ -418,6 +418,7 @@ builder.withDrawerLayout(R.layout.material_drawer);
* [Sporza Voetbal](http://play.google.com/store/apps/details?id=be.vrt.mobile.android.sporza.voetbal)
* [Atmosphere](https://play.google.com/store/apps/details?id=com.peakpocketstudios.atmosphere)
* [Slidechat](https://play.google.com/store/apps/details?id=com.taddu.adfree.slidechat)
+* [Fitness Challenge](https://play.google.com/store/apps/details?id=com.isidroid.fitchallenge)
#Articles about the MaterialDrawer
* [java-help.ru](http://java-help.ru/material-navigationdrawer/)
diff --git a/app/build.gradle b/app/build.gradle
index cd8e332c9..223e31b25 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
- versionCode 540
- versionName "5.4.0"
+ versionCode 550
+ versionName "5.5.0"
setProperty("archivesBaseName", "-v$versionName-c$versionCode")
}
diff --git a/build.gradle b/build.gradle
index 16e701edd..1a02c4ede 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,10 +2,10 @@ buildscript {
ext {
setup = [compileSdk: 24,
buildTools: "24.0.1",
- minSdk : 10,
+ minSdk : 14,
targetSdk : 24]
- versions = [supportLib: "24.1.1"]
+ versions = [supportLib: "24.2.0"]
}
repositories {
diff --git a/gradle.properties b/gradle.properties
index 6d9fe0794..7d6c93736 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,6 +1,6 @@
# Maven stuff
-VERSION_NAME=5.4.0
-VERSION_CODE=540
+VERSION_NAME=5.5.0
+VERSION_CODE=550
GROUP=com.mikepenz
POM_DESCRIPTION=MaterialDrawer Library
POM_URL=https://github.com/mikepenz/MaterialDrawer
diff --git a/library/build.gradle b/library/build.gradle
index 9e3934a59..f63e5821e 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
- versionCode 540
- versionName '5.4.0'
+ versionCode 550
+ versionName '5.5.0'
}
buildTypes {
release {
@@ -37,15 +37,15 @@ dependencies {
// contains util classes to support various android versions, and clean up code
// comes with the awesome "Holder"-Pattern
// https://github.com/mikepenz/Materialize
- compile 'com.mikepenz:materialize:0.9.0@aar'
+ compile 'com.mikepenz:materialize:1.0.0@aar'
// used to provide out of the box icon font support. simplifies development,
// and provides scalable icons. the core is very very light
// https://github.com/mikepenz/Android-Iconics
- compile 'com.mikepenz:iconics-core:2.7.2@aar'
+ compile 'com.mikepenz:iconics-core:2.8.0@aar'
// 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.6.1@aar'
+ compile 'com.mikepenz:fastadapter:1.7.0@aar'
}
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java
index ca17fb3d8..690404ce1 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java
@@ -13,6 +13,7 @@
import android.support.annotation.DrawableRes;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
+import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewCompat;
import android.text.TextUtils;
import android.view.View;
@@ -725,7 +726,7 @@ private void setHeaderHeight(int height) {
private void handleSelectionView(IProfile profile, boolean on) {
if (on) {
if (Build.VERSION.SDK_INT >= 21) {
- ((FrameLayout) mAccountHeaderContainer).setForeground(UIUtils.getCompatDrawable(mAccountHeaderContainer.getContext(), mAccountHeaderTextSectionBackgroundResource));
+ ((FrameLayout) mAccountHeaderContainer).setForeground(ContextCompat.getDrawable(mAccountHeaderContainer.getContext(), mAccountHeaderTextSectionBackgroundResource));
mAccountHeaderContainer.setOnClickListener(onSelectionClickListener);
mAccountHeaderContainer.setTag(R.id.material_drawer_profile_header, profile);
} else {
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
index 0675c5c48..ef1474f93 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
@@ -1427,9 +1427,9 @@ public void onDrawerSlide(View drawerView, float slideOffset) {
//handle the ActionBarDrawerToggle
if (mActionBarDrawerToggle != null) {
mActionBarDrawerToggle.setToolbarNavigationClickListener(toolbarNavigationListener);
- mDrawerLayout.setDrawerListener(mActionBarDrawerToggle);
+ mDrawerLayout.addDrawerListener(mActionBarDrawerToggle);
} else {
- mDrawerLayout.setDrawerListener(new DrawerLayout.DrawerListener() {
+ mDrawerLayout.addDrawerListener(new DrawerLayout.DrawerListener() {
@Override
public void onDrawerSlide(View drawerView, float slideOffset) {
if (mOnDrawerListener != null) {
@@ -1819,9 +1819,7 @@ protected boolean checkDrawerItem(int position, boolean includeOffset) {
protected void resetStickyFooterSelection() {
if (mStickyFooterView instanceof LinearLayout) {
for (int i = 0; i < (mStickyFooterView).getChildCount(); i++) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
- (mStickyFooterView).getChildAt(i).setActivated(false);
- }
+ (mStickyFooterView).getChildAt(i).setActivated(false);
(mStickyFooterView).getChildAt(i).setSelected(false);
}
}
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java b/library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java
index ad7c06b4a..a2b1192d9 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/DrawerUtils.java
@@ -34,9 +34,7 @@ public static void onFooterDrawerItemClick(DrawerBuilder drawer, IDrawerItem dra
if (checkable) {
drawer.resetStickyFooterSelection();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
- v.setActivated(true);
- }
+ v.setActivated(true);
v.setSelected(true);
//remove the selection in the list
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java b/library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java
index 6bf348eb0..7f8fa01bd 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java
@@ -6,13 +6,13 @@
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.DrawableRes;
+import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.ImageView;
import com.mikepenz.iconics.IconicsDrawable;
import com.mikepenz.iconics.typeface.IIcon;
import com.mikepenz.materialdrawer.util.DrawerImageLoader;
-import com.mikepenz.materialize.util.UIUtils;
import java.io.FileNotFoundException;
import java.io.InputStream;
@@ -100,7 +100,7 @@ public Drawable decideIcon(Context ctx, int iconColor, boolean tint, int padding
if (mIIcon != null) {
icon = new IconicsDrawable(ctx, mIIcon).color(iconColor).sizeDp(24).paddingDp(paddingDp);
} else if (getIconRes() != -1) {
- icon = UIUtils.getCompatDrawable(ctx, getIconRes());
+ icon = ContextCompat.getDrawable(ctx, getIconRes());
} else if (getUri() != null) {
try {
InputStream inputStream = ctx.getContentResolver().openInputStream(getUri());
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/model/utils/BadgeDrawableBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/model/utils/BadgeDrawableBuilder.java
index 64286d576..3c428eb3c 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/model/utils/BadgeDrawableBuilder.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/model/utils/BadgeDrawableBuilder.java
@@ -3,11 +3,11 @@
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
+import android.support.v4.content.ContextCompat;
import android.util.StateSet;
import com.mikepenz.materialdrawer.holder.BadgeStyle;
import com.mikepenz.materialdrawer.holder.ColorHolder;
-import com.mikepenz.materialize.util.UIUtils;
/**
* Created by mikepenz on 02.07.15.
@@ -21,8 +21,7 @@ public BadgeDrawableBuilder(BadgeStyle style) {
public StateListDrawable build(Context ctx) {
StateListDrawable stateListDrawable = new StateListDrawable();
-
- GradientDrawable normal = (GradientDrawable) UIUtils.getCompatDrawable(ctx, mStyle.getGradientDrawable());
+ GradientDrawable normal = (GradientDrawable) ContextCompat.getDrawable(ctx, mStyle.getGradientDrawable());
GradientDrawable selected = (GradientDrawable) normal.getConstantState().newDrawable().mutate();
ColorHolder.applyToOrTransparent(mStyle.getColor(), ctx, normal);
diff --git a/library/src/main/res/values/library_materialdrawer_strings.xml b/library/src/main/res/values/library_materialdrawer_strings.xml
index 0cf89b4af..01bab2d76 100755
--- a/library/src/main/res/values/library_materialdrawer_strings.xml
+++ b/library/src/main/res/values/library_materialdrawer_strings.xml
@@ -10,7 +10,7 @@
MaterialDrawer the flexible, easy to use, all in one drawer library for your Android project.
]]>
- 5.4.0
+ 5.5.0
https://github.com/mikepenz/MaterialDrawer
apache_2_0
true