Skip to content

Commit

Permalink
Merge pull request #2736 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Jul 20, 2021
2 parents 0320c19 + ab9afaf commit ff51274
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
with:
fetch-depth: 100

- uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
ast (2.4.1)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

## Latest releases 🛠

- Kotlin && New | [v8.4.1](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.1)
- Kotlin && New | [v8.4.2](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.2)
- Kotlin | [v7.0.0](https://github.com/mikepenz/MaterialDrawer/tree/v7.0.0) | (Builder approach like v6.x)
- 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
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:${versions.swiperefreshLayout}"

// used to showcase how to load images
implementation("io.coil-kt:coil:1.1.1")
implementation("io.coil-kt:coil:1.3.0")

// the sample uses more advanced functions of the fastadapter
// https://github.com/mikepenz/FastAdapter/
Expand All @@ -85,15 +85,15 @@ dependencies {

//used to provide different itemAnimators for the RecyclerView
//https://github.com/mikepenz/ItemAnimators
implementation 'com.mikepenz:itemanimators:1.1.0'
implementation 'com.mikepenz:itemanimators:1.1.0@aar'
// used to provide the MiniDrawer to normal Drawer crossfade effect via a SlidingPane layout
// --> https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.java
// https://github.com/mikepenz/Crossfader
implementation 'com.mikepenz:crossfader:1.6.0'
implementation 'com.mikepenz:crossfader:1.6.0@aar'
// used to provide the two step crossfade DrawerLayout. Which allows to have a mini layout which transforms to a normal layout within the drawer
// --> https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.java
// https://github.com/mikepenz/CrossfadeDrawerLayout
implementation('com.mikepenz:crossfadedrawerlayout:1.1.0')
implementation('com.mikepenz:crossfadedrawerlayout:1.1.0@aar')

// icon fonts used inside the sample
// https://github.com/mikepenz/Android-Iconics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class AdvancedActivity : AppCompatActivity() {
}
iconicsIcon = GoogleMaterial.Icon.gmd_filter_center_focus
},
CustomPrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad; background = ColorHolder.fromColorRes(R.color.accent) },
CustomPrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad; background = ColorHolder.fromColorRes(R.color.colorAccent) },
PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; descriptionText = "This is a description"; iconicsIcon = FontAwesome.Icon.faw_eye },
CustomUrlPrimaryDrawerItem().apply { nameRes = R.string.drawer_item_fragment_drawer; description = StringHolder(R.string.drawer_item_fragment_drawer_desc); iconUrl = "https://avatars3.githubusercontent.com/u/1476232?v=3&s=460" },
SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header },
Expand Down Expand Up @@ -165,7 +165,7 @@ class AdvancedActivity : AppCompatActivity() {
when (item.itemId) {
R.id.menu_1 -> {
//update the profile2 and set a new image.
profile2.iconDrawable = IconicsDrawable(this, GoogleMaterial.Icon.gmd_android).apply { backgroundColorRes = R.color.accent; paddingDp = 4; sizeDp = 48 }
profile2.iconDrawable = IconicsDrawable(this, GoogleMaterial.Icon.gmd_android).apply { backgroundColorRes = R.color.colorAccent; paddingDp = 4; sizeDp = 48 }
headerView.updateProfile(profile2)
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CompactHeaderDrawerActivity : AppCompatActivity() {
nameText = "Mike Penz"; descriptionText = "[email protected]"; iconRes = R.drawable.profile; badgeText = "123"
badgeStyle = BadgeStyle().apply {
textColor = ColorHolder.fromColor(Color.WHITE)
color = ColorHolder.fromColorRes(R.color.md_red_700)
color = ColorHolder.fromColorRes(R.color.colorAccent)
}
}
val profile2 = ProfileDrawerItem().apply { nameText = "Max Muster"; descriptionText = "[email protected]"; iconRes = R.drawable.profile2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class CustomApplication : MultiDexApplication() {
//custom ones can be checked via string. see the CustomUrlBasePrimaryDrawerItem LINE 111
return when (tag) {
DrawerImageLoader.Tags.PROFILE.name -> getPlaceHolder(ctx)
DrawerImageLoader.Tags.ACCOUNT_HEADER.name -> IconicsDrawable(ctx, " ").apply { backgroundColorRes = R.color.primary; sizeDp = 56 }
"customUrlItem" -> IconicsDrawable(ctx, " ").apply { backgroundColorRes = R.color.md_red_500; sizeDp = 56 }
DrawerImageLoader.Tags.ACCOUNT_HEADER.name -> IconicsDrawable(ctx, " ").apply { backgroundColorRes = R.color.colorPrimary; sizeDp = 56 }
"customUrlItem" -> IconicsDrawable(ctx, " ").apply { backgroundColorRes = R.color.colorAccent; sizeDp = 56 }
//we use the default one for
//DrawerImageLoader.Tags.PROFILE_DRAWER_ITEM.name()
else -> super.placeholder(ctx, tag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DrawerActivity : AppCompatActivity() {
PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_navigation_drawer; descriptionRes = R.string.drawer_item_navigation_drawer_desc; iconicsIcon = GoogleMaterial.Icon.gmd_navigation; isSelectable = false; identifier = 1305 },
ExpandableBadgeDrawerItem().apply {
nameText = "Collapsable Badge"; iconicsIcon = GoogleMaterial.Icon.gmd_format_bold; identifier = 18; isSelectable = false; badge = StringHolder("100")
badgeStyle = BadgeStyle().apply { textColor = ColorHolder.fromColor(Color.WHITE); color = ColorHolder.fromColorRes(R.color.md_red_700) }
badgeStyle = BadgeStyle().apply { textColor = ColorHolder.fromColor(Color.WHITE); color = ColorHolder.fromColorRes(R.color.colorAccent) }
subItems = mutableListOf(
SecondaryDrawerItem().apply { nameText = "CollapsableItem"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_format_bold; identifier = 2000 },
SecondaryDrawerItem().apply { nameText = "CollapsableItem 2"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_format_bold; identifier = 2001 }
Expand Down
26 changes: 12 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ buildscript {

ext {
release = [
versionName: "8.4.1",
versionCode: 8041
versionName: "8.4.2",
versionCode: 8042
]

setup = [
Expand All @@ -17,19 +17,19 @@ buildscript {
versions = [
multiDex : '2.0.1',
annotation : '1.1.0',
recyclerView : '1.1.0',
core : '1.3.2',
material : '1.3.0',
appcompat : '1.2.0',
recyclerView : '1.2.1',
core : '1.6.0',
material : '1.4.0',
appcompat : '1.3.0',
drawerlayout : '1.1.1',
constraintLayout : '2.0.4',
cardview : '1.0.0',
kotlin : "1.4.32",
fastadapter : "5.3.5",
kotlin : "1.5.21",
fastadapter : "5.4.1",
iconics : "5.2.8",
aboutLibs : "8.8.4",
navigation : "2.3.4",
detekt : '1.16.0',
aboutLibs : "8.9.1",
navigation : "2.3.5",
detekt : '1.17.1',
slidingpaneLayout : "1.1.0",
swiperefreshLayout: "1.1.0"
]
Expand All @@ -39,10 +39,9 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:7.1.0-alpha03'
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}"
Expand All @@ -56,7 +55,6 @@ allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,18 @@ internal fun rebuildStickyFooterView(sliderView: MaterialDrawerSliderView) {

//fill the footer with items
fillStickyDrawerItemFooter(sliderView, it) { v ->
val drawerItem = v.getTag(R.id.material_drawer_item) as IDrawerItem<*>
onFooterDrawerItemClick(sliderView, drawerItem, v, true)
(v.getTag(R.id.material_drawer_item) as? IDrawerItem<*>)?.let { drawerItem ->
onFooterDrawerItemClick(sliderView, drawerItem, v, true)
}
}

it.visibility = View.VISIBLE
} ?: run {
//there was no footer yet. now just create one
handleFooterView(sliderView) { v ->
val drawerItem = v.getTag(R.id.material_drawer_item) as IDrawerItem<*>
onFooterDrawerItemClick(sliderView, drawerItem, v, true)
(v.getTag(R.id.material_drawer_item) as? IDrawerItem<*>)?.let { drawerItem ->
onFooterDrawerItemClick(sliderView, drawerItem, v, true)
}
}
}

Expand Down

0 comments on commit ff51274

Please sign in to comment.