Skip to content

Commit

Permalink
Merge branch 'release/v7.0.0-rc06'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Sep 1, 2019
2 parents e603091 + 49f78c3 commit 143eb10
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 80 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -53,7 +53,7 @@ You can find some frequently asked questions and other resources in the [WIKI /

## Latest releases

- Kotlin | [v7.0.0-rc05](https://github.com/mikepenz/MaterialDrawer/tree/v7.0.0-rc05)
- Kotlin | [v7.0.0-rc06](https://github.com/mikepenz/MaterialDrawer/tree/v7.0.0-rc06)
- Java && AndroidX | [v6.1.2](https://github.com/mikepenz/MaterialDrawer/tree/v6.1.2)
- Java && AppCompat |[v6.0.9](https://github.com/mikepenz/MaterialDrawer/tree/v6.0.9)

Expand Down
9 changes: 3 additions & 6 deletions app/build.gradle
Expand Up @@ -51,22 +51,19 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
exclude 'META-INF/library_release.kotlin_module'
}
}

dependencies {
implementation project(':library')
implementation project(':library-nav')

implementation "androidx.multidex:multidex:${versions.multiDex}"
implementation "com.google.android.material:material:${versions.material}"
implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.cardview:cardview:${versions.cardview}"
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
implementation "androidx.slidingpanelayout:slidingpanelayout:${versions.slidingpaneLayout}"

// used to showcase how to load images
implementation 'com.squareup.picasso:picasso:2.71828'
Expand All @@ -84,7 +81,7 @@ dependencies {
implementation "com.mikepenz:fastadapter-extensions-utils:${versions.fastadapter}"
// used to generate the Open Source section
// https://github.com/mikepenz/AboutLibraries
implementation 'com.mikepenz:aboutlibraries:7.0.0'
implementation 'com.mikepenz:aboutlibraries:7.0.3'

//used to provide different itemAnimators for the RecyclerView
//https://github.com/mikepenz/ItemAnimators
Expand Down
@@ -1,23 +1,22 @@
package com.mikepenz.materialdrawer.app

import android.app.Application
import android.content.Context
import android.graphics.drawable.Drawable
import android.net.Uri
import android.widget.ImageView
import androidx.multidex.MultiDexApplication
import com.bumptech.glide.Glide
import com.mikepenz.iconics.IconicsColor.Companion.colorRes
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.IconicsSize.Companion.dp
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerUIUtils
import com.squareup.picasso.Picasso

/**
* Created by mikepenz on 27.03.15.
*/
class CustomApplication : Application() {
class CustomApplication : MultiDexApplication() {
override fun onCreate() {
super.onCreate()

Expand Down
Expand Up @@ -5,6 +5,8 @@ import android.os.Build
import android.os.Bundle
import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.updatePadding
import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome
import com.mikepenz.materialdrawer.Drawer
import com.mikepenz.materialdrawer.DrawerBuilder
Expand Down Expand Up @@ -59,40 +61,18 @@ class FullscreenDrawerActivity : AppCompatActivity() {
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setHomeButtonEnabled(false)

/*
//USE THIS CODE TO GET A FULL TRANSPARENT STATUS BAR
//YOU HAVE TO UNCOMMENT THE setWindowFlag too.
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
setWindowFlag(this, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}
if (Build.VERSION.SDK_INT >= 21) {
setWindowFlag(this, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
result?.drawerLayout?.let {
ViewCompat.setOnApplyWindowInsetsListener(it) { v, insets ->
toolbar.updatePadding(top = insets.systemWindowInsetTop)
insets
}
}
*/

if (Build.VERSION.SDK_INT >= 19) {
result?.drawerLayout?.fitsSystemWindows = false
}
}

/*
public static void setWindowFlag(Activity activity, final int bits, boolean on) {
Window win = activity.getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
if (on) {
winParams.flags |= bits;
} else {
winParams.flags &= ~bits;
}
win.setAttributes(winParams);
}
*/

override fun onSaveInstanceState(_outState: Bundle) {
var outState = _outState
//add the values which need to be saved from the drawer to the bundle
Expand Down
Expand Up @@ -7,6 +7,8 @@ import android.view.MenuItem
import android.view.View
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.updatePadding
import com.mikepenz.crossfader.Crossfader
import com.mikepenz.crossfader.view.CrossFadeSlidingPaneLayout
import com.mikepenz.iconics.IconicsColor.Companion.colorInt
Expand Down Expand Up @@ -118,6 +120,11 @@ class PersistentDrawerActivity : AppCompatActivity() {
//for RTL you would have to define the other arrow
toggle.setImageDrawable(IconicsDrawable(this, GoogleMaterial.Icon.gmd_chevron_left).size(dp(16)).color(colorInt(Color.BLACK)))
toggle.setOnClickListener { crossFader.crossFade() }

ViewCompat.setOnApplyWindowInsetsListener(root) { v, insets ->
toolbar.updatePadding(top = insets.systemWindowInsetTop)
insets
}
}

override fun onSaveInstanceState(_outState: Bundle) {
Expand Down
20 changes: 7 additions & 13 deletions app/src/main/res/layout/activity_persistent_drawer.xml
@@ -1,6 +1,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
Expand All @@ -11,22 +12,15 @@
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:paddingTop="@dimen/tool_bar_top_padding">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute" />
</LinearLayout>
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:targetApi="lollipop" />

<TextView
android:layout_width="match_parent"
Expand Down
@@ -1,5 +1,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
Expand All @@ -8,7 +10,8 @@
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff4444">
android:background="#ff4444"
android:fitsSystemWindows="false">

<TextView
android:id="@+id/txtLabel"
Expand All @@ -22,10 +25,13 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginTop="@dimen/fullscreen_status_bar_height"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</RelativeLayout>
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:targetApi="lollipop" />
</androidx.constraintlayout.widget.ConstraintLayout>
34 changes: 18 additions & 16 deletions build.gradle
@@ -1,9 +1,9 @@
buildscript {
ext.kotlin_version = '1.3.41'

ext {
kotlin_version = '1.3.50'

release = [
versionName: "7.0.0-rc05",
versionName: "7.0.0-rc06",
versionCode: 7000
]

Expand All @@ -15,18 +15,20 @@ buildscript {
]

versions = [
androidX : '1.0.0',
annotation : '1.1.0',
recyclerView : '1.1.0-beta01',
material : '1.1.0-alpha08',
appcompat : '1.1.0-rc01',
drawerlayout : '1.1.0-alpha02',
constraintLayout: '2.0.0-beta2',
cardview : '1.0.0',
kotlin : "1.3.41",
fastadapter : "4.0.1",
iconics : "4.0.1-b01",
navigation : "2.0.0"
multiDex : '2.0.1',
androidX : '1.0.0',
annotation : '1.1.0',
recyclerView : '1.1.0-beta03',
material : '1.1.0-alpha09',
appcompat : '1.1.0-rc01',
drawerlayout : '1.1.0-alpha03',
constraintLayout : '2.0.0-beta2',
cardview : '1.0.0',
kotlin : "1.3.50",
fastadapter : "4.1.0-b02",
iconics : "4.0.1-b02",
navigation : "2.0.0",
slidingpaneLayout: "1.0.0"
]
}

Expand All @@ -36,7 +38,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
Expand Down
6 changes: 2 additions & 4 deletions library-nav/build.gradle
Expand Up @@ -32,10 +32,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
exclude 'META-INF/library_release.kotlin_module'
}
// specify the artifactId as module-name for kotlin
kotlinOptions.freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID]
}

dependencies {
Expand Down
6 changes: 2 additions & 4 deletions library/build.gradle
Expand Up @@ -34,10 +34,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
exclude 'META-INF/library_release.kotlin_module'
}
// specify the artifactId as module-name for kotlin
kotlinOptions.freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID]
}

dependencies {
Expand Down

0 comments on commit 143eb10

Please sign in to comment.