From 01056124dbe1043e5cec2c0058a2402ddec19323 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Wed, 29 Jun 2016 08:13:14 +0200 Subject: [PATCH 1/4] Update .travis.yml * fix travis build --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5b347582b..8a526a77e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: android + android: components: # Uncomment the lines below if you want to @@ -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 From fd38c040096b619fca212c9342cdb6e37ab392e4 Mon Sep 17 00:00:00 2001 From: fabianterhorst Date: Thu, 30 Jun 2016 11:07:11 +0200 Subject: [PATCH 2/4] improve tablet support * add padding at the bottom of the RecyclerView when the tablet is in landscape and the navigation bar is at the bottom --- .../materialdrawer/DrawerBuilder.java | 7 ++++++- .../materialdrawer/util/DrawerUIUtils.java | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java index f8f8274f4..0675c5c48 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java +++ b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java @@ -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; @@ -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); } diff --git a/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java b/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java index 0c21476f5..9abad9934 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java +++ b/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java @@ -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; @@ -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); + } } From c408e7c7936ee08aa546698b2e4815b10f53dbd7 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 3 Jul 2016 19:27:48 +0200 Subject: [PATCH 3/4] * update to latest FastAdapter v1.5.8 --- library/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/build.gradle b/library/build.gradle index 1ae66ff10..b5d1300f8 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -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' } From c2858dbe69e3eb0bc4c01385253068c12b3afeda Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 3 Jul 2016 19:28:49 +0200 Subject: [PATCH 4/4] * [release] v5.3.3 --- README.md | 2 +- app/build.gradle | 6 +++--- gradle.properties | 4 ++-- library/build.gradle | 4 ++-- .../src/main/res/values/library_materialdrawer_strings.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index db2103568..e299438d0 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.3.2@aar') { +compile('com.mikepenz:materialdrawer:5.3.3@aar') { transitive = true } ``` diff --git a/app/build.gradle b/app/build.gradle index 88c3163d2..1d3a23a25 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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") } @@ -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" } diff --git a/gradle.properties b/gradle.properties index 8dc1626fe..59d01cdea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/library/build.gradle b/library/build.gradle index b5d1300f8..c21d51fca 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -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 { diff --git a/library/src/main/res/values/library_materialdrawer_strings.xml b/library/src/main/res/values/library_materialdrawer_strings.xml index 371a1a359..4b7a95424 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.3.2 + 5.3.3 https://github.com/mikepenz/MaterialDrawer apache_2_0 true