Skip to content

Commit

Permalink
Merge branch 'release/v5.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 20, 2016
2 parents 6d8e88e + c5f05f8 commit 351a785
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 27 deletions.
1 change: 1 addition & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 11 additions & 0 deletions FAQ/howto_modify_add_custom_draweritems.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```
Expand Down Expand Up @@ -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/)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<b>MaterialDrawer</b> the flexible, easy to use, all in one drawer library for your Android project.
]]>
</string>
<string name="library_materialdrawer_libraryVersion">5.4.0</string>
<string name="library_materialdrawer_libraryVersion">5.5.0</string>
<string name="library_materialdrawer_libraryWebsite">https://github.com/mikepenz/MaterialDrawer</string>
<string name="library_materialdrawer_licenseId">apache_2_0</string>
<string name="library_materialdrawer_isOpenSource">true</string>
Expand Down

0 comments on commit 351a785

Please sign in to comment.