diff --git a/README.md b/README.md
index f510421bf..0e449f239 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,8 @@
## Latest releases đź›
-- Kotlin && New | [v8.4.5](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.5)
-- Kotlin | [v7.0.0](https://github.com/mikepenz/MaterialDrawer/tree/v7.0.0) | (Builder approach like v6.x)
+- Kotlin && Material 3 | [v9.0.0](https://github.com/mikepenz/MaterialDrawer/tree/v9.0.0)
+- Kotlin | [v8.4.5](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.5)
- 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)
@@ -64,7 +64,7 @@ implementation "com.mikepenz:materialdrawer:${lastestMaterialDrawerRelease}"
implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.annotation}"
-implementation "com.google.android.material:material:${versions.material}"
+implementation "com.google.android.material:material:1.5.0-alpha05" // requires at least 1.5.0-x
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
// Add for NavController support
@@ -100,7 +100,7 @@ The `MaterialDrawerSliderView` has to be provided as child of the `DrawerLayout`
### 3. Add the `DrawerStyle` to your theme
```xml
-
// define a custom header style
@@ -289,7 +293,7 @@ Create your custom style. If you don't need a custom theme see the next section,
// define the custom styles for the theme
-
-
-
-
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index d1fa09d63..9c3e4dce6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,13 +3,13 @@ buildscript {
ext {
release = [
- versionName: "8.4.5",
- versionCode: 8045
+ versionName: "9.0.0",
+ versionCode: 9000
]
setup = [
compileSdk: 31,
- minSdk : 16,
+ minSdk : 21,
targetSdk : 30
]
@@ -17,30 +17,31 @@ buildscript {
multiDex : '2.0.1',
annotation : '1.1.0',
recyclerView : '1.2.1',
- core : '1.6.0',
- material : '1.4.0',
- appcompat : '1.3.1',
+ core : '1.7.0',
+ material : '1.5.0',
+ appcompat : '1.4.1',
drawerlayout : '1.1.1',
- constraintLayout : '2.1.1',
+ constraintLayout : '2.1.3',
cardview : '1.0.0',
- kotlin : "1.5.31",
- fastadapter : "5.5.1",
- iconics : "5.3.2",
- aboutLibs : "8.9.4",
- navigation : "2.3.5",
+ kotlin : "1.6.20",
+ fastadapter : "5.6.0",
+ iconics : "5.3.3",
+ aboutLibs : "10.1.0",
+ navigation : "2.4.2",
detekt : '1.18.1',
- slidingpaneLayout : "1.1.0",
+ slidingpaneLayout : "1.1.0", // no plans to upgrade to 1.2.0 anymore
swiperefreshLayout: "1.1.0"
]
}
repositories {
- maven { url "https://plugins.gradle.org/m2/" }
+ gradlePluginPortal()
google()
mavenCentral()
+ mavenLocal()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.2.0-alpha02'
+ classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:${versions.navigation}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}"
@@ -54,6 +55,7 @@ allprojects {
repositories {
google()
mavenCentral()
+ mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a0f7639f7..669386b87 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 3da45c161..1b6c78733 100755
--- a/gradlew
+++ b/gradlew
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright ? 2015-2021 the original authors.
+# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
-# * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?,
-# ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?;
-# * compound commands having a testable exit status, especially ?case?;
-# * various built-in commands including ?command?, ?set?, and ?ulimit?.
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
diff --git a/materialdrawer-nav/src/main/java/com/mikepenz/materialdrawer/util/DrawerNavigationUI.kt b/materialdrawer-nav/src/main/java/com/mikepenz/materialdrawer/util/DrawerNavigationUI.kt
index 320212e8b..139559594 100644
--- a/materialdrawer-nav/src/main/java/com/mikepenz/materialdrawer/util/DrawerNavigationUI.kt
+++ b/materialdrawer-nav/src/main/java/com/mikepenz/materialdrawer/util/DrawerNavigationUI.kt
@@ -19,11 +19,30 @@ import java.lang.ref.WeakReference
* @param fallBackListener the listener to handle no navigationDrawerItems
* @return
*/
+@Deprecated("Added new successListener", ReplaceWith("setupWithNavController(navController, null, fallBackListener)"))
+fun MaterialDrawerSliderView.setupWithNavController(
+ navController: NavController,
+ fallBackListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null,
+) {
+ setupWithNavController(navController, null, fallBackListener)
+}
+
+/**
+ * Sets up a {@link Drawer} for use with a {@link NavController}.
+ * The selected item in the Drawer will automatically be updated when the destination
+ * changes.
+ *
+ * @param navController The NavController that hosts the destination
+ * @param successListener listener to retrieve a notification on successful navigation
+ * @param fallBackListener the listener to handle no navigationDrawerItems
+ * @return
+ */
fun MaterialDrawerSliderView.setupWithNavController(
navController: NavController,
- fallBackListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null
+ successListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null,
+ fallBackListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null,
) {
- DrawerNavigationUI.setupWithNavController(this, navController, fallBackListener)
+ DrawerNavigationUI.setupWithNavController(this, navController, successListener, fallBackListener)
}
/**
@@ -47,11 +66,13 @@ object DrawerNavigationUI {
fun setupWithNavController(
drawer: MaterialDrawerSliderView,
navController: NavController,
+ successListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null,
fallBackListener: ((v: View?, item: IDrawerItem<*>, position: Int) -> Boolean)? = null
) {
drawer.onDrawerItemClickListener = { v, item, position ->
val success = performNavigation(item, navController)
if (success) {
+ successListener?.invoke(v, item, position)
drawer.drawerLayout?.closeDrawer(drawer)
} else {
fallBackListener?.invoke(v, item, position)
@@ -72,7 +93,7 @@ object DrawerNavigationUI {
// A ResId may refers to 3 intents.
val destinationId = controller.graph.getAction(element.resId)?.let { action ->
if (action.destinationId != 0) action.destinationId // an action navigate to a destination
- else action.navOptions?.popUpTo // an action pop to a destination
+ else action.navOptions?.popUpToId // an action pop to a destination
} ?: element.resId // a destination
if (matchDestination(destination, destinationId)) {
@@ -132,4 +153,4 @@ object DrawerNavigationUI {
}
return currentDestination.id == destId
}
-}
\ No newline at end of file
+}
diff --git a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/BaseDescribeableDrawerItem.kt b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/BaseDescribeableDrawerItem.kt
index e0a48f596..3ec8f072c 100644
--- a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/BaseDescribeableDrawerItem.kt
+++ b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/BaseDescribeableDrawerItem.kt
@@ -3,7 +3,10 @@ package com.mikepenz.materialdrawer.model
import android.content.Context
import android.content.res.ColorStateList
import android.view.View
+import androidx.core.view.isVisible
+import androidx.core.view.updatePadding
import com.google.android.material.shape.ShapeAppearanceModel
+import com.mikepenz.materialdrawer.R
import com.mikepenz.materialdrawer.holder.ImageHolder
import com.mikepenz.materialdrawer.holder.StringHolder
import com.mikepenz.materialdrawer.model.interfaces.Describable
@@ -72,6 +75,14 @@ abstract class BaseDescribeableDrawerItem : BaseDrawerIt
ImageHolder.applyMultiIconTo(icon, selectedIcon, iconColor, isIconTinted, viewHolder.icon)
}
+ if (viewHolder.icon.isVisible) {
+ viewHolder.name.updatePadding(left = 0)
+ viewHolder.description.updatePadding(left = 0)
+ } else {
+ viewHolder.name.updatePadding(left = ctx.resources.getDimensionPixelSize(R.dimen.material_drawer_item_primary_icon_padding_left))
+ viewHolder.description.updatePadding(left = ctx.resources.getDimensionPixelSize(R.dimen.material_drawer_item_primary_icon_padding_left))
+ }
+
//for android API 17 --> Padding not applied via xml
viewHolder.view.setDrawerVerticalPadding(level)
diff --git a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/ProfileSettingDrawerItem.kt b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/ProfileSettingDrawerItem.kt
index edb2a4501..84e1902ee 100644
--- a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/ProfileSettingDrawerItem.kt
+++ b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/model/ProfileSettingDrawerItem.kt
@@ -5,7 +5,6 @@ import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.LayoutRes
-import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.RecyclerView
import com.mikepenz.materialdrawer.R
import com.mikepenz.materialdrawer.holder.BadgeStyle
@@ -13,8 +12,8 @@ import com.mikepenz.materialdrawer.holder.ImageHolder
import com.mikepenz.materialdrawer.holder.StringHolder
import com.mikepenz.materialdrawer.model.interfaces.*
import com.mikepenz.materialdrawer.util.getPrimaryDrawerIconColor
-import com.mikepenz.materialdrawer.util.getSelectableBackground
import com.mikepenz.materialdrawer.util.setDrawerVerticalPadding
+import com.mikepenz.materialdrawer.util.themeDrawerItem
/**
* Describes a [IProfile] being used with the [com.mikepenz.materialdrawer.widget.AccountHeaderView]
@@ -68,8 +67,10 @@ open class ProfileSettingDrawerItem : AbstractDrawerItem Context.resolveStyledHeaderValue(resolver: (typedArray: TypedAr
return resolveStyledValue(R.styleable.AccountHeaderView, R.attr.materialDrawerHeaderStyle, R.style.Widget_MaterialDrawerHeaderStyle, resolver)
}
-internal fun Context.resolveStyledValue(attrs: IntArray = R.styleable.MaterialDrawerSliderView, defStyleAttr: Int = R.attr.materialDrawerStyle, defStyleRes: Int = R.style.Widget_MaterialDrawerStyle, resolver: (typedArray: TypedArray) -> T): T {
+internal fun Context.resolveStyledValue(
+ attrs: IntArray = R.styleable.MaterialDrawerSliderView,
+ defStyleAttr: Int = R.attr.materialDrawerStyle,
+ defStyleRes: Int = R.style.Widget_MaterialDrawerStyle,
+ resolver: (typedArray: TypedArray) -> T
+): T {
val a = obtainStyledAttributes(null, attrs, defStyleAttr, defStyleRes)
val value = resolver.invoke(a)
a.recycle()
diff --git a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/widget/MaterialDrawerSliderView.kt b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/widget/MaterialDrawerSliderView.kt
index 8eb97f4cf..7797144c5 100644
--- a/materialdrawer/src/main/java/com/mikepenz/materialdrawer/widget/MaterialDrawerSliderView.kt
+++ b/materialdrawer/src/main/java/com/mikepenz/materialdrawer/widget/MaterialDrawerSliderView.kt
@@ -40,7 +40,6 @@ import com.mikepenz.materialdrawer.model.AbstractDrawerItem
import com.mikepenz.materialdrawer.model.ContainerDrawerItem
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem
import com.mikepenz.materialdrawer.util.*
-import java.util.*
/**
* This view is a simple drop in view for the [DrawerLayout] offering a convenient API to provide a nice and flexible slider view following
@@ -251,7 +250,6 @@ open class MaterialDrawerSliderView @JvmOverloads constructor(context: Context,
var multiSelect
set(value) {
this.selectExtension.multiSelect = value
- this.selectExtension.selectOnLongClick = !value
this.selectExtension.allowDeselection = value
}
get() = this.selectExtension.multiSelect
@@ -412,10 +410,10 @@ open class MaterialDrawerSliderView @JvmOverloads constructor(context: Context,
if (headerView == null && accountHeader == null) {
if (stickyHeaderView == null) {
- recyclerView.updatePadding(top = insets.systemWindowInsetTop)
+ recyclerView.updatePadding(top = insets.systemWindowInsetTop + context.resources.getDimensionPixelSize(R.dimen.material_drawer_padding_top_bottom))
}
if (stickyFooterView == null) {
- recyclerView.updatePadding(bottom = insets.systemWindowInsetBottom)
+ recyclerView.updatePadding(bottom = insets.systemWindowInsetBottom + context.resources.getDimensionPixelSize(R.dimen.material_drawer_padding_top_bottom))
}
}
@@ -584,7 +582,7 @@ open class MaterialDrawerSliderView @JvmOverloads constructor(context: Context,
innerShadow.setBackgroundResource(R.drawable.material_drawer_shadow_left)
}
} else {
- removeView(this.findViewById(R.id.material_drawer_inner_shadow))
+ removeView(this.findViewById(R.id.material_drawer_inner_shadow))
}
//handle the header
diff --git a/materialdrawer/src/main/res/color/color_drawer_item_text.xml b/materialdrawer/src/main/res/color/color_drawer_item_text.xml
new file mode 100644
index 000000000..a2658fa9c
--- /dev/null
+++ b/materialdrawer/src/main/res/color/color_drawer_item_text.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_divider.xml b/materialdrawer/src/main/res/layout/material_drawer_item_divider.xml
index d3884419c..fc11064ee 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_divider.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_divider.xml
@@ -3,5 +3,7 @@
android:id="@+id/material_drawer_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
+ android:layout_marginLeft="@dimen/material_drawer_vertical_item_padding"
android:layout_marginTop="@dimen/material_drawer_padding"
+ android:layout_marginRight="@dimen/material_drawer_vertical_item_padding"
android:layout_marginBottom="@dimen/material_drawer_padding" />
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_expandable.xml b/materialdrawer/src/main/res/layout/material_drawer_item_expandable.xml
index 02ff48103..54553a3d2 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_expandable.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_expandable.xml
@@ -13,8 +13,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_primary_icon"
android:layout_height="@dimen/material_drawer_item_primary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_primary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_primary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_primary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_primary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_primary_icon_padding_right"
@@ -69,6 +69,8 @@
android:layout_height="16dp"
android:layout_marginStart="@dimen/material_drawer_padding"
android:layout_marginLeft="@dimen/material_drawer_padding"
+ android:layout_marginEnd="@dimen/material_drawer_item_primary_icon_padding"
+ android:layout_marginRight="@dimen/material_drawer_item_primary_icon_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/material_drawer_barrier"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_expandable_badge.xml b/materialdrawer/src/main/res/layout/material_drawer_item_expandable_badge.xml
index ecc7d9f41..f79e421af 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_item_expandable_badge.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_expandable_badge.xml
@@ -14,8 +14,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_primary_icon"
android:layout_height="@dimen/material_drawer_item_primary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_primary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_primary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_primary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_primary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_primary_icon_padding_right"
@@ -92,8 +92,8 @@
android:layout_height="16dp"
android:layout_marginStart="0dp"
android:layout_marginLeft="0dp"
- android:layout_marginEnd="0dp"
- android:layout_marginRight="0dp"
+ android:layout_marginEnd="@dimen/material_drawer_item_primary_icon_padding"
+ android:layout_marginRight="@dimen/material_drawer_item_primary_icon_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/material_drawer_badge"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_primary.xml b/materialdrawer/src/main/res/layout/material_drawer_item_primary.xml
index e030e86af..e423492c9 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_primary.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_primary.xml
@@ -13,8 +13,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_primary_icon"
android:layout_height="@dimen/material_drawer_item_primary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_primary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_primary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_primary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_primary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_primary_icon_padding_right"
@@ -73,8 +73,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/material_drawer_padding"
android:layout_marginLeft="@dimen/material_drawer_padding"
- android:layout_marginEnd="0dp"
- android:layout_marginRight="0dp"
+ android:layout_marginEnd="@dimen/material_drawer_padding"
+ android:layout_marginRight="@dimen/material_drawer_padding"
android:fontFamily="sans-serif"
android:gravity="center"
android:lines="1"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_profile.xml b/materialdrawer/src/main/res/layout/material_drawer_item_profile.xml
index 0273f27bb..5117e7d3b 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_profile.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_profile.xml
@@ -4,6 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/material_drawer_item_profile"
+ android:layout_marginTop="@dimen/material_drawer_item_profile_item_margin"
+ android:layout_marginBottom="@dimen/material_drawer_item_profile_item_margin"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingStart="@dimen/material_drawer_vertical_padding"
@@ -16,10 +18,10 @@
style="@style/BezelImageView"
android:layout_width="@dimen/material_drawer_item_profile_icon"
android:layout_height="@dimen/material_drawer_item_profile_icon"
- android:layout_marginStart="0dp"
- android:layout_marginLeft="0dp"
- android:layout_marginEnd="@dimen/material_drawer_item_profile_icon_padding_right"
- android:layout_marginRight="@dimen/material_drawer_item_profile_icon_padding_right"
+ android:layout_marginStart="@dimen/material_drawer_item_profile_icon_padding_left"
+ android:layout_marginLeft="@dimen/material_drawer_item_profile_icon_padding_left"
+ android:layout_marginEnd="0dp"
+ android:layout_marginRight="0dp"
android:clickable="false"
android:elevation="1dp"
app:layout_constraintBottom_toBottomOf="parent"
@@ -30,8 +32,8 @@
android:id="@+id/material_drawer_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/material_drawer_padding"
- android:layout_marginLeft="@dimen/material_drawer_padding"
+ android:layout_marginStart="@dimen/material_drawer_item_profile_icon_padding_right"
+ android:layout_marginLeft="@dimen/material_drawer_item_profile_icon_padding_right"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|start"
android:lines="1"
@@ -53,8 +55,8 @@
android:id="@+id/material_drawer_email"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/material_drawer_padding"
- android:layout_marginLeft="@dimen/material_drawer_padding"
+ android:layout_marginStart="@dimen/material_drawer_item_profile_icon_padding_right"
+ android:layout_marginLeft="@dimen/material_drawer_item_profile_icon_padding_right"
android:layout_marginEnd="0dp"
android:layout_marginRight="0dp"
android:fontFamily="sans-serif"
@@ -86,8 +88,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/material_drawer_padding"
android:layout_marginLeft="@dimen/material_drawer_padding"
- android:layout_marginEnd="0dp"
- android:layout_marginRight="0dp"
+ android:layout_marginEnd="@dimen/material_drawer_item_profile_badge_padding_right"
+ android:layout_marginRight="@dimen/material_drawer_item_profile_badge_padding_right"
android:fontFamily="sans-serif"
android:gravity="center"
android:lines="1"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_profile_setting.xml b/materialdrawer/src/main/res/layout/material_drawer_item_profile_setting.xml
index a966c337d..ad829af15 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_profile_setting.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_profile_setting.xml
@@ -4,6 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/material_drawer_item_profile"
+ android:layout_marginTop="@dimen/material_drawer_item_profile_item_margin"
+ android:layout_marginBottom="@dimen/material_drawer_item_profile_item_margin"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingStart="@dimen/material_drawer_vertical_padding"
@@ -13,14 +15,14 @@
@@ -71,8 +73,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/material_drawer_padding"
android:layout_marginLeft="@dimen/material_drawer_padding"
- android:layout_marginEnd="0dp"
- android:layout_marginRight="0dp"
+ android:layout_marginEnd="@dimen/material_drawer_padding"
+ android:layout_marginRight="@dimen/material_drawer_padding"
android:fontFamily="sans-serif"
android:gravity="center"
android:lines="1"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_secondary.xml b/materialdrawer/src/main/res/layout/material_drawer_item_secondary.xml
index 83f01dc70..90e658aa3 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_secondary.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_secondary.xml
@@ -13,8 +13,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_secondary_icon"
android:layout_height="@dimen/material_drawer_item_secondary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_secondary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_secondary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_secondary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_secondary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_secondary_icon_padding_right"
@@ -68,8 +68,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/material_drawer_padding"
android:layout_marginLeft="@dimen/material_drawer_padding"
- android:layout_marginEnd="0dp"
- android:layout_marginRight="0dp"
+ android:layout_marginEnd="@dimen/material_drawer_padding"
+ android:layout_marginRight="@dimen/material_drawer_padding"
android:fontFamily="sans-serif"
android:gravity="center"
android:lines="1"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_secondary_switch.xml b/materialdrawer/src/main/res/layout/material_drawer_item_secondary_switch.xml
index 03b1736e5..8b10f1ca7 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_item_secondary_switch.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_secondary_switch.xml
@@ -16,8 +16,8 @@
android:layout_width="@dimen/material_drawer_item_secondary_icon"
android:layout_height="@dimen/material_drawer_item_secondary"
android:layout_gravity="center_vertical"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_secondary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_secondary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_secondary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_secondary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_secondary_icon_padding_right"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_secondary_toggle.xml b/materialdrawer/src/main/res/layout/material_drawer_item_secondary_toggle.xml
index e0b51bb8b..b80aa45e0 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_item_secondary_toggle.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_secondary_toggle.xml
@@ -11,8 +11,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_secondary_icon"
android:layout_height="@dimen/material_drawer_item_secondary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_secondary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_secondary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_secondary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_secondary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_secondary_icon_padding_right"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_section.xml b/materialdrawer/src/main/res/layout/material_drawer_item_section.xml
index 86530a5d4..b9d44dc4a 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_item_section.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_section.xml
@@ -8,7 +8,9 @@
android:id="@+id/material_drawer_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
- android:layout_marginTop="@dimen/material_drawer_padding" />
+ android:layout_marginTop="@dimen/material_drawer_padding"
+ android:layout_marginLeft="@dimen/material_drawer_vertical_item_padding"
+ android:layout_marginRight="@dimen/material_drawer_vertical_item_padding" />
\ No newline at end of file
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_switch.xml b/materialdrawer/src/main/res/layout/material_drawer_item_switch.xml
index af15a74ed..b7518496c 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_item_switch.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_switch.xml
@@ -16,8 +16,8 @@
android:layout_width="@dimen/material_drawer_item_primary_icon"
android:layout_height="@dimen/material_drawer_item_primary"
android:layout_gravity="center_vertical"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_primary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_primary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_primary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_primary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_primary_icon_padding_right"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_item_toggle.xml b/materialdrawer/src/main/res/layout/material_drawer_item_toggle.xml
index 43444bb49..88e58d83e 100755
--- a/materialdrawer/src/main/res/layout/material_drawer_item_toggle.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_item_toggle.xml
@@ -10,8 +10,8 @@
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/material_drawer_item_primary_icon"
android:layout_height="@dimen/material_drawer_item_primary"
- android:paddingStart="0dp"
- android:paddingLeft="0dp"
+ android:paddingStart="@dimen/material_drawer_item_primary_icon_padding_left"
+ android:paddingLeft="@dimen/material_drawer_item_primary_icon_padding_left"
android:paddingTop="@dimen/material_drawer_item_primary_icon_padding"
android:paddingEnd="@dimen/material_drawer_item_primary_icon_padding_right"
android:paddingRight="@dimen/material_drawer_item_primary_icon_padding_right"
diff --git a/materialdrawer/src/main/res/layout/material_drawer_recycler_view.xml b/materialdrawer/src/main/res/layout/material_drawer_recycler_view.xml
index 9f23362f2..a77cedf6f 100644
--- a/materialdrawer/src/main/res/layout/material_drawer_recycler_view.xml
+++ b/materialdrawer/src/main/res/layout/material_drawer_recycler_view.xml
@@ -4,5 +4,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
+ android:clipToPadding="false"
android:focusable="true"
+ android:paddingTop="@dimen/material_drawer_padding_top_bottom"
+ android:paddingBottom="@dimen/material_drawer_padding_top_bottom"
android:scrollbars="vertical" />
\ No newline at end of file
diff --git a/materialdrawer/src/main/res/values/dimens.xml b/materialdrawer/src/main/res/values/dimens.xml
index b29709269..d22f047bc 100755
--- a/materialdrawer/src/main/res/values/dimens.xml
+++ b/materialdrawer/src/main/res/values/dimens.xml
@@ -8,8 +8,10 @@
0dp
8dp
+ 8dp
- 16dp
+ 12dp
+ 28dp
1dp
@@ -42,33 +44,37 @@
8dp
- 4dp
- 8dp
+ 28dp
+ 12dp
@dimen/material_drawer_item_background_padding_start_end
@dimen/material_drawer_item_background_padding_start_end
- 4dp
+ 0dp
- 48dp
- 56dp
- 12dp
- 32dp
+ 56dp
+ 52dp
+ 16dp
+ 16dp
+ 12dp
14sp
14sp
12sp
- 42dp
- 56dp
+ 48dp
+ 52dp
12dp
- 36dp
+ 18dp
+ 14dp
14sp
12sp
- 72dp
+ 56dp
+ 8dp
40dp
- 48dp
16dp
- 8dp
+ 6dp
+ 6dp
+ 16dp
14sp
14sp
@@ -88,9 +94,6 @@
14sp
-
- 0.12
-
56dp
24dp
diff --git a/materialdrawer/src/main/res/values/styles.xml b/materialdrawer/src/main/res/values/styles.xml
index 59c7e0cfb..b0bce056a 100644
--- a/materialdrawer/src/main/res/values/styles.xml
+++ b/materialdrawer/src/main/res/values/styles.xml
@@ -5,37 +5,25 @@
- #4000
- ?colorSurface
- - ?android:textColorPrimary
- - ?android:textColorSecondary
- - ?android:textColorSecondary
- - ?android:textColorSecondary
- - ?android:textColorHint
- - ?colorPrimary
+ - @color/color_drawer_item_text
+ - @color/color_drawer_item_text
+ - @color/color_drawer_item_text
+ - @color/color_drawer_item_text
+ - ?colorOutline
+ - ?colorSecondaryContainer
-
-
-
-
-
-
\ No newline at end of file