Skip to content

Commit

Permalink
Merge branch 'release/v5.2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jun 1, 2016
2 parents d505c25 + b1bdbe4 commit 5a443c6
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 26 deletions.
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.8@aar') {
compile('com.mikepenz:materialdrawer:5.2.9@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 528
versionName "5.2.8"
versionCode 529
versionName "5.2.9"

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.8
VERSION_CODE=528
VERSION_NAME=5.2.9
VERSION_CODE=529
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 528
versionName '5.2.8'
versionCode 529
versionName '5.2.9'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.view.SupportMenuInflater;
Expand Down Expand Up @@ -1564,7 +1565,7 @@ private void createContent() {

//set the shadow for the drawer
if (Build.VERSION.SDK_INT < 21 && mDrawerLayout != null) {
if (mDrawerGravity == GravityCompat.START) {
if (ViewCompat.getLayoutDirection(mRootView) == ViewCompat.LAYOUT_DIRECTION_LTR) {
mDrawerLayout.setDrawerShadow(R.drawable.material_drawer_shadow_right, mDrawerGravity);
} else {
mDrawerLayout.setDrawerShadow(R.drawable.material_drawer_shadow_left, mDrawerGravity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class ProfileSettingDrawerItem extends AbstractDrawerItem<ProfileSettingD

private Typeface typeface = null;

private boolean selectable = false;

@Override
public ProfileSettingDrawerItem withIcon(Drawable icon) {
this.icon = new ImageHolder(icon);
Expand Down Expand Up @@ -179,12 +181,17 @@ public StringHolder getDescription() {
}

public void setDescription(String description) {
this.email = email;
this.email = new StringHolder(description);
}

@Override
public boolean isSelectable() {
return false;
return selectable;
}

public ProfileSettingDrawerItem withSelectable(boolean selectable) {
this.selectable = selectable;
return this;
}

@Override
Expand Down
26 changes: 11 additions & 15 deletions library/src/main/res/layout/material_drawer_compact_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
android:layout_height="@dimen/material_drawer_account_header_height_compact"
android:scaleType="fitXY" />

<RelativeLayout
<LinearLayout
android:id="@+id/material_drawer_account_header"
android:layout_width="match_parent"
android:layout_height="@dimen/material_drawer_account_header_height_compact">
android:layout_height="@dimen/material_drawer_account_header_height_compact"
android:orientation="horizontal">

<com.mikepenz.materialdrawer.view.BezelImageView
android:id="@+id/material_drawer_account_header_small_first"
Expand All @@ -35,25 +36,22 @@
android:id="@+id/material_drawer_account_header_current"
android:layout_width="@dimen/material_drawer_account_header_compact"
android:layout_height="@dimen/material_drawer_account_header_compact"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/material_drawer_padding"
android:layout_marginEnd="0dp"
android:layout_marginLeft="@dimen/material_drawer_vertical_padding"
android:layout_marginRight="0dp"
android:layout_marginStart="@dimen/material_drawer_vertical_padding"
android:clickable="true"
android:elevation="2dp" />

<LinearLayout
android:id="@+id/material_drawer_account_header_text_section"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/material_drawer_padding"
android:layout_toEndOf="@+id/material_drawer_account_header_current"
android:layout_toLeftOf="@+id/material_drawer_account_header_text_switcher"
android:layout_toRightOf="@+id/material_drawer_account_header_current"
android:layout_toStartOf="@+id/material_drawer_account_header_text_switcher"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingEnd="@dimen/material_drawer_vertical_padding"
Expand Down Expand Up @@ -85,13 +83,11 @@
android:id="@+id/material_drawer_account_header_text_switcher"
android:layout_width="@dimen/material_drawer_account_header_dropdown"
android:layout_height="@dimen/material_drawer_account_header_dropdown"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/material_drawer_padding"
android:layout_marginEnd="@dimen/material_drawer_vertical_padding"
android:layout_marginRight="@dimen/material_drawer_vertical_padding"
android:layout_marginTop="@dimen/material_drawer_account_header_dropdown" />

</RelativeLayout>
</LinearLayout>
</FrameLayout>
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.8</string>
<string name="library_materialdrawer_libraryVersion">5.2.9</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 5a443c6

Please sign in to comment.