Skip to content

Commit

Permalink
Merge branch 'release/v5.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Apr 26, 2016
2 parents e1925a2 + ce64654 commit 07643a6
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 11 deletions.
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.2.0 -> v5.2.1
* the `SecondaryDrawerItem` is now a subclass of the `PrimaryDrawerItem` (extends `PrimaryDrawerItem`). If you have an `if` which checks for the type with `instanceOf` make sure you check for the `SecondaryDrawerItem` first. (`secondaryDrawerItem instanceOf PrimaryDrawerItem == true`)

#### v5.1.6 -> 5.1.8
* if you use the `FastAdapter` please check out the release notes of v1.4.0 (https://github.com/mikepenz/FastAdapter/releases/tag/v1.4.0)

Expand Down
2 changes: 1 addition & 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.2.1@aar') {
compile('com.mikepenz:materialdrawer:5.2.2@aar') {
transitive = true
}
```
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 521
versionName "5.2.1"
versionCode 522
versionName "5.2.2"

setProperty("archivesBaseName", "-v$versionName-c$versionCode")
}
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.2.1
VERSION_CODE=521
VERSION_NAME=5.2.2
VERSION_CODE=522
GROUP=com.mikepenz

POM_DESCRIPTION=MaterialDrawer Library
Expand Down
4 changes: 2 additions & 2 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 521
versionName '5.2.1'
versionCode 522
versionName '5.2.2'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ public FastAdapter.OnLongClickListener getOnMiniDrawerItemLongClickListener() {
* @return
*/
public IDrawerItem generateMiniDrawerItem(IDrawerItem drawerItem) {
if (drawerItem instanceof PrimaryDrawerItem) {
if (drawerItem instanceof SecondaryDrawerItem) {
return mIncludeSecondaryDrawerItems ? new MiniDrawerItem((SecondaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground) : null;
} else if (drawerItem instanceof PrimaryDrawerItem) {
return new MiniDrawerItem((PrimaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground);
} else if (drawerItem instanceof SecondaryDrawerItem && mIncludeSecondaryDrawerItems) {
return new MiniDrawerItem((SecondaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground);
} else if (drawerItem instanceof ProfileDrawerItem) {
MiniProfileDrawerItem mpdi = new MiniProfileDrawerItem((ProfileDrawerItem) drawerItem);
mpdi.withEnabled(mEnableProfileClick);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ protected void bindViewHelper(BaseViewHolder viewHolder) {
//set the item selected if it is
viewHolder.itemView.setSelected(isSelected());

//set the item enabled if it is
viewHolder.itemView.setEnabled(isEnabled());

//
viewHolder.itemView.setTag(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ public void bindView(ViewHolder viewHolder) {
//set the identifier from the drawerItem here. It can be used to run tests
viewHolder.itemView.setId(hashCode());

//set the item enabled if it is
viewHolder.itemView.setEnabled(isEnabled());

//set the item selected if it is
viewHolder.itemView.setSelected(isSelected());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public void bindView(ViewHolder viewHolder) {
//set the identifier from the drawerItem here. It can be used to run tests
viewHolder.itemView.setId(hashCode());

//set the item enabled if it is
viewHolder.itemView.setEnabled(isEnabled());

//set the icon
ImageHolder.applyToOrSetInvisible(getIcon(), viewHolder.icon);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ public void bindView(ViewHolder viewHolder) {
//set the identifier from the drawerItem here. It can be used to run tests
viewHolder.itemView.setId(hashCode());

//set the item enabled if it is
viewHolder.itemView.setEnabled(isEnabled());

//set the item selected if it is
viewHolder.itemView.setSelected(isSelected());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ public void bindView(ViewHolder viewHolder) {
//set the identifier from the drawerItem here. It can be used to run tests
viewHolder.itemView.setId(hashCode());

//set the item enabled if it is
viewHolder.itemView.setEnabled(isEnabled());

//set the item selected if it is
viewHolder.itemView.setSelected(isSelected());

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.2.1</string>
<string name="library_materialdrawer_libraryVersion">5.2.2</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 07643a6

Please sign in to comment.