Skip to content

Commit

Permalink
Merge branch 'release/v5.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jul 3, 2016
2 parents 28d79da + c2858db commit 00ae51b
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 11 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: android

android:
components:
# Uncomment the lines below if you want to
Expand All @@ -15,3 +16,19 @@ android:
# Additional components
- extra-google-m2repository
- extra-android-m2repository

jdk:
- oraclejdk8

branches:
except:
- gh-pages

notifications:
email: false

sudo: false

cache:
directories:
- $HOME/.m2
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.3.2@aar') {
compile('com.mikepenz:materialdrawer:5.3.3@aar') {
transitive = true
}
```
Expand Down
6 changes: 3 additions & 3 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 532
versionName "5.3.2"
versionCode 533
versionName "5.3.3"

setProperty("archivesBaseName", "-v$versionName-c$versionCode")
}
Expand Down Expand Up @@ -53,7 +53,7 @@ dependencies {

// used to generate the Open Source section
// https://github.com/mikepenz/AboutLibraries
compile('com.mikepenz:aboutlibraries:5.6.8@aar') {
compile('com.mikepenz:aboutlibraries:5.7.0@aar') {
transitive = true
exclude module: "fastadapter"
}
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.3.2
VERSION_CODE=532
VERSION_NAME=5.3.3
VERSION_CODE=533
GROUP=com.mikepenz
POM_DESCRIPTION=MaterialDrawer Library
POM_URL=https://github.com/mikepenz/MaterialDrawer
Expand Down
6 changes: 3 additions & 3 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 532
versionName '5.3.2'
versionCode 533
versionName '5.3.3'
}
buildTypes {
release {
Expand Down Expand Up @@ -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.6@aar'
compile 'com.mikepenz:fastadapter:1.5.8@aar'
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import com.mikepenz.materialdrawer.model.SecondaryDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.Selectable;
import com.mikepenz.materialdrawer.util.DrawerUIUtils;
import com.mikepenz.materialize.Materialize;
import com.mikepenz.materialize.MaterializeBuilder;
import com.mikepenz.materialize.util.UIUtils;
Expand Down Expand Up @@ -1607,7 +1608,11 @@ private void createContent() {
paddingTop = UIUtils.getStatusBarHeight(mActivity);
}
int paddingBottom = 0;
if (((mTranslucentNavigationBar || mFullscreen) && Build.VERSION.SDK_INT >= 21) && !mSystemUIHidden && mActivity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
int orientation = mActivity.getResources().getConfiguration().orientation;
if (((mTranslucentNavigationBar || mFullscreen) && Build.VERSION.SDK_INT >= 21) && !mSystemUIHidden
&& (orientation == Configuration.ORIENTATION_PORTRAIT
|| (orientation == Configuration.ORIENTATION_LANDSCAPE
&& DrawerUIUtils.isSystemBarOnBottom(mActivity)))) {
paddingBottom = UIUtils.getNavigationBarHeight(mActivity);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.WindowManager;

import com.mikepenz.iconics.IconicsDrawable;
import com.mikepenz.materialdrawer.R;
Expand Down Expand Up @@ -118,4 +121,21 @@ public static void setDrawerVerticalPadding(View v, int level) {
v.setPadding(verticalPadding * level, 0, verticalPadding, 0);
}
}

/**
* helper to check if the system bar is on the bottom of the screen
*
* @param ctx
* @return
*/
public static boolean isSystemBarOnBottom(Context ctx) {
WindowManager wm = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics metrics = new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(metrics);
Configuration cfg = ctx.getResources().getConfiguration();
boolean canMove = (metrics.widthPixels != metrics.heightPixels &&
cfg.smallestScreenWidthDp < 600);

return (!canMove || metrics.widthPixels < metrics.heightPixels);
}
}
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.3.2</string>
<string name="library_materialdrawer_libraryVersion">5.3.3</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 00ae51b

Please sign in to comment.