diff --git a/DEV/default-detekt-config.yml b/DEV/default-detekt-config.yml new file mode 100644 index 000000000..4aa024ab8 --- /dev/null +++ b/DEV/default-detekt-config.yml @@ -0,0 +1,530 @@ +build: + maxIssues: 0 + weights: + # complexity: 2 + # LongParameterList: 1 + # style: 1 + # comments: 1 + +processors: + active: true + exclude: + # - 'FunctionCountProcessor' + # - 'PropertyCountProcessor' + # - 'ClassCountProcessor' + # - 'PackageCountProcessor' + # - 'KtFileCountProcessor' + +console-reports: + active: true + exclude: + # - 'ProjectStatisticsReport' + # - 'ComplexityReport' + # - 'NotificationReport' + # - 'FindingsReport' + # - 'BuildFailureReport' + +comments: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + CommentOverPrivateFunction: + active: false + CommentOverPrivateProperty: + active: false + EndOfSentenceFormat: + active: false + endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!:]$) + UndocumentedPublicClass: + active: false + searchInNestedClass: true + searchInInnerClass: true + searchInInnerObject: true + searchInInnerInterface: true + UndocumentedPublicFunction: + active: false + +complexity: + active: true + ComplexCondition: + active: true + threshold: 6 + ComplexInterface: + active: false + threshold: 10 + includeStaticDeclarations: false + ComplexMethod: + active: false + threshold: 10 + ignoreSingleWhenExpression: false + ignoreSimpleWhenEntries: false + LabeledExpression: + active: false + ignoredLabels: "" + LargeClass: + active: true + threshold: 1000 + LongMethod: + active: false + threshold: 60 + LongParameterList: + active: true + threshold: 10 + ignoreDefaultParameters: true + MethodOverloading: + active: false + threshold: 6 + NestedBlockDepth: + active: false + threshold: 4 + StringLiteralDuplication: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + threshold: 3 + ignoreAnnotation: true + excludeStringsWithLessThan5Characters: true + ignoreStringsRegex: '$^' + TooManyFunctions: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + thresholdInFiles: 11 + thresholdInClasses: 11 + thresholdInInterfaces: 11 + thresholdInObjects: 11 + thresholdInEnums: 11 + ignoreDeprecated: false + ignorePrivate: false + ignoreOverridden: false + +empty-blocks: + active: true + EmptyCatchBlock: + active: true + allowedExceptionNameRegex: "^(_|(ignore|expected).*)" + EmptyClassBlock: + active: true + EmptyDefaultConstructor: + active: true + EmptyDoWhileBlock: + active: true + EmptyElseBlock: + active: true + EmptyFinallyBlock: + active: true + EmptyForBlock: + active: true + EmptyFunctionBlock: + active: false + ignoreOverriddenFunctions: false + EmptyIfBlock: + active: true + EmptyInitBlock: + active: true + EmptyKtFile: + active: true + EmptySecondaryConstructor: + active: true + EmptyWhenBlock: + active: true + EmptyWhileBlock: + active: true + +exceptions: + active: true + ExceptionRaisedInUnexpectedLocation: + active: false + methodNames: 'toString,hashCode,equals,finalize' + InstanceOfCheckForException: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + NotImplementedDeclaration: + active: false + PrintStackTrace: + active: false + RethrowCaughtException: + active: false + ReturnFromFinally: + active: false + SwallowedException: + active: false + ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException' + ThrowingExceptionFromFinally: + active: false + ThrowingExceptionInMain: + active: false + ThrowingExceptionsWithoutMessageOrCause: + active: false + exceptions: 'IllegalArgumentException,IllegalStateException,IOException' + ThrowingNewInstanceOfSameException: + active: false + TooGenericExceptionCaught: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + exceptionNames: + - ArrayIndexOutOfBoundsException + - Error + - Exception + - IllegalMonitorStateException + - NullPointerException + - IndexOutOfBoundsException + - RuntimeException + - Throwable + allowedExceptionNameRegex: "^(_|(ignore|expected).*)" + TooGenericExceptionThrown: + active: false + exceptionNames: + - Error + - Exception + - Throwable + - RuntimeException + +formatting: + active: true + android: true + autoCorrect: true + ChainWrapping: + active: true + autoCorrect: true + CommentSpacing: + active: false + autoCorrect: true + Filename: + active: true + FinalNewline: + active: false + autoCorrect: true + ImportOrdering: + active: false + Indentation: + active: false + autoCorrect: true + indentSize: 4 + continuationIndentSize: 8 + MaximumLineLength: + active: false + maxLineLength: 120 + ModifierOrdering: + active: true + autoCorrect: true + NoBlankLineBeforeRbrace: + active: true + autoCorrect: true + NoConsecutiveBlankLines: + active: false + autoCorrect: true + NoEmptyClassBody: + active: true + autoCorrect: true + NoItParamInMultilineLambda: + active: false + NoLineBreakAfterElse: + active: true + autoCorrect: true + NoLineBreakBeforeAssignment: + active: true + autoCorrect: true + NoMultipleSpaces: + active: false + autoCorrect: true + NoSemicolons: + active: true + autoCorrect: true + NoTrailingSpaces: + active: false + autoCorrect: true + NoUnitReturn: + active: true + autoCorrect: true + NoUnusedImports: + active: true + autoCorrect: true + NoWildcardImports: + active: false + autoCorrect: true + PackageName: + active: true + autoCorrect: true + ParameterListWrapping: + active: false + autoCorrect: true + indentSize: 4 + SpacingAroundColon: + active: true + autoCorrect: true + SpacingAroundComma: + active: true + autoCorrect: true + SpacingAroundCurly: + active: true + autoCorrect: true + SpacingAroundKeyword: + active: true + autoCorrect: true + SpacingAroundOperators: + active: true + autoCorrect: true + SpacingAroundParens: + active: true + autoCorrect: true + SpacingAroundRangeOperator: + active: true + autoCorrect: true + StringTemplate: + active: true + autoCorrect: true + +naming: + active: true + ClassNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + classPattern: '[A-Z$][a-zA-Z0-9$]*' + ConstructorParameterNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + parameterPattern: '[a-z][A-Za-z0-9]*' + privateParameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + EnumNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*' + ForbiddenClassName: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + forbiddenName: '' + FunctionMaxLength: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + maximumFunctionNameLength: 30 + FunctionMinLength: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + minimumFunctionNameLength: 3 + FunctionNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' + excludeClassPattern: '$^' + ignoreOverridden: true + FunctionParameterNaming: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + parameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + ignoreOverriddenFunctions: true + InvalidPackageDeclaration: + active: false + rootPackage: '' + MatchingDeclarationName: + active: true + MemberNameEqualsClassName: + active: false + ignoreOverriddenFunction: true + ObjectPropertyNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + constantPattern: '[A-Za-z][_A-Za-z0-9]*' + propertyPattern: '[A-Za-z][_A-Za-z0-9]*' + privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' + PackageNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$' + TopLevelPropertyNaming: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + constantPattern: '[A-Z][_A-Z0-9]*' + propertyPattern: '[A-Za-z][_A-Za-z0-9]*' + privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' + VariableMaxLength: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + maximumVariableNameLength: 64 + VariableMinLength: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + minimumVariableNameLength: 1 + VariableNaming: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + variablePattern: '[a-z][A-Za-z0-9]*' + privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + ignoreOverridden: true + +performance: + active: true + ArrayPrimitive: + active: false + ForEachOnRange: + active: true + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + SpreadOperator: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + UnnecessaryTemporaryInstantiation: + active: true + +potential-bugs: + active: true + DuplicateCaseInWhenExpression: + active: true + EqualsAlwaysReturnsTrueOrFalse: + active: false + EqualsWithHashCodeExist: + active: true + ExplicitGarbageCollectionCall: + active: true + InvalidRange: + active: false + IteratorHasNextCallsNextMethod: + active: false + IteratorNotThrowingNoSuchElementException: + active: false + LateinitUsage: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + excludeAnnotatedProperties: "" + ignoreOnClassesPattern: "" + MissingWhenCase: + active: false + UnconditionalJumpStatementInLoop: + active: false + UnreachableCode: + active: true + UnsafeCallOnNullableType: + active: false + UnsafeCast: + active: false + UselessPostfixExpression: + active: false + WrongEqualsTypeParameter: + active: false + +style: + active: true + CollapsibleIfStatements: + active: false + DataClassContainsFunctions: + active: false + conversionFunctionPrefix: 'to' + DataClassShouldBeImmutable: + active: false + EqualsNullCall: + active: false + EqualsOnSignatureLine: + active: false + ExplicitItLambdaParameter: + active: false + ExpressionBodySyntax: + active: false + includeLineWrapping: false + ForbiddenComment: + active: true + values: 'TODO:,FIXME:,STOPSHIP:' + ForbiddenImport: + active: false + imports: '' + ForbiddenVoid: + active: false + ignoreOverridden: false + FunctionOnlyReturningConstant: + active: false + ignoreOverridableFunction: true + excludedFunctions: 'describeContents' + LoopWithTooManyJumpStatements: + active: false + maxJumpCount: 1 + MagicNumber: + active: false + excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt" + ignoreNumbers: '-1,0,1,2' + ignoreHashCodeFunction: true + ignorePropertyDeclaration: false + ignoreConstantDeclaration: true + ignoreCompanionObjectPropertyDeclaration: true + ignoreAnnotation: false + ignoreNamedArgument: true + ignoreEnums: false + ignoreRanges: false + MandatoryBracesIfStatements: + active: false + MaxLineLength: + active: false + MayBeConst: + active: false + ModifierOrder: + active: true + NestedClassesVisibility: + active: false + NewLineAtEndOfFile: + active: false + NoTabs: + active: false + OptionalAbstractKeyword: + active: true + OptionalUnit: + active: false + OptionalWhenBraces: + active: false + PreferToOverPairSyntax: + active: false + ProtectedMemberInFinalClass: + active: false + RedundantVisibilityModifierRule: + active: false + ReturnCount: + active: false + max: 2 + excludedFunctions: "equals" + excludeLabeled: false + excludeReturnFromLambda: true + SafeCast: + active: true + SerialVersionUIDInSerializableClass: + active: false + SpacingBetweenPackageAndImports: + active: false + ThrowsCount: + active: true + max: 2 + TrailingWhitespace: + active: false + UnderscoresInNumericLiterals: + active: false + acceptableDecimalLength: 5 + UnnecessaryAbstractClass: + active: false + excludeAnnotatedClasses: "dagger.Module" + UnnecessaryApply: + active: false + UnnecessaryInheritance: + active: false + UnnecessaryLet: + active: false + UnnecessaryParentheses: + active: false + UntilInsteadOfRangeTo: + active: false + UnusedImports: + active: false + UnusedPrivateClass: + active: false + UnusedPrivateMember: + active: false + allowedNames: "(_|ignored|expected|serialVersionUID)" + UseCheckOrError: + active: false + UseDataClass: + active: false + excludeAnnotatedClasses: "" + UseRequire: + active: false + UselessCallOnNotNull: + active: false + UtilityClassWithPublicConstructor: + active: false + VarCouldBeVal: + active: false + WildcardImport: + active: false diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt index 711c1bad0..d0bcefcb8 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt @@ -108,7 +108,7 @@ class CompactHeaderDrawerActivity : AppCompatActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { if (actionBarDrawerToggle.onOptionsItemSelected(item)) { - return true; + return true } return super.onOptionsItemSelected(item) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt index 747277d0d..ef76c6e1b 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt @@ -116,7 +116,7 @@ class CrossfadeDrawerLayoutActvitiy : AppCompatActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { if (actionBarDrawerToggle.onOptionsItemSelected(item)) { - return true; + return true } return super.onOptionsItemSelected(item) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt index c4eada56a..c799297c5 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt @@ -51,7 +51,7 @@ class DrawerActivity : AppCompatActivity() { val profile4 = ProfileDrawerItem().apply { nameText = "Felix House"; descriptionText = "felix.house@gmail.com"; iconRes = R.drawable.profile3; identifier = 103 } val profile5 = ProfileDrawerItem().apply { nameText = "Mr. X"; descriptionText = "mister.x.super@gmail.com"; iconRes = R.drawable.profile4; identifier = 104 } val profile6 = ProfileDrawerItem().apply { - nameText = "Batman"; descriptionText = "batman@gmail.com"; iconRes = R.drawable.profile5; identifier = 105; badgeText = "123"; + nameText = "Batman"; descriptionText = "batman@gmail.com"; iconRes = R.drawable.profile5; identifier = 105; badgeText = "123" badgeStyle = BadgeStyle().apply { textColor = ColorHolder.fromColor(Color.BLACK) color = ColorHolder.fromColor(Color.WHITE) @@ -163,7 +163,6 @@ class DrawerActivity : AppCompatActivity() { } false - } setSavedInstance(savedInstanceState) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt index 4aa470f25..abe5d1b7b 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt @@ -81,7 +81,7 @@ class FullscreenDrawerActivity : AppCompatActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { if (actionBarDrawerToggle.onOptionsItemSelected(item)) { - return true; + return true } return super.onOptionsItemSelected(item) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/MenuDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/MenuDrawerActivity.kt index 3422dbf1f..0e48daf2b 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/MenuDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/MenuDrawerActivity.kt @@ -55,7 +55,7 @@ class MenuDrawerActivity : AppCompatActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { if (actionBarDrawerToggle.onOptionsItemSelected(item)) { - return true; + return true } return super.onOptionsItemSelected(item) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomBaseViewHolder.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomBaseViewHolder.kt index fe1e76baf..81d8b7c33 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomBaseViewHolder.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomBaseViewHolder.kt @@ -10,5 +10,4 @@ open class CustomBaseViewHolder(var view: View) : RecyclerView.ViewHolder(view) var icon: ImageView = view.findViewById(R.id.material_drawer_icon) var name: TextView = view.findViewById(R.id.material_drawer_name) var description: TextView = view.findViewById(R.id.material_drawer_description) - } \ No newline at end of file diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.kt index aee8d1e2e..b586ca41f 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/drawerItems/CustomCenteredPrimaryDrawerItem.kt @@ -10,5 +10,4 @@ class CustomCenteredPrimaryDrawerItem : PrimaryDrawerItem() { override val type: Int get() = R.id.material_drawer_item_centered_primary - } diff --git a/build.gradle b/build.gradle index 7ae4b6e6d..aa21c37fc 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ buildscript { iconics : "5.0.3", aboutLibs : "8.3.0", navigation : "2.3.0", + detekt : '1.12.0', slidingpaneLayout : "1.1.0", swiperefreshLayout: "1.1.0" ] @@ -45,6 +46,7 @@ buildscript { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' 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}" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${versions.aboutLibs}" } } @@ -57,3 +59,11 @@ allprojects { maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } } + +subprojects { + apply from: '../detekt.gradle' + + dependencies { + detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:${versions.detekt}" + } +} \ No newline at end of file diff --git a/detekt.gradle b/detekt.gradle new file mode 100644 index 000000000..253de38ae --- /dev/null +++ b/detekt.gradle @@ -0,0 +1,7 @@ +apply plugin: "io.gitlab.arturbosch.detekt" + +detekt { + toolVersion = "${versions.detekt}" + //input = files("src/main/kotlin") + config = files(buildscript.sourceFile.getParent().toString() + "/DEV/default-detekt-config.yml") +} \ No newline at end of file diff --git a/library/src/main/java/com/mikepenz/materialdrawer/holder/BadgeStyle.kt b/library/src/main/java/com/mikepenz/materialdrawer/holder/BadgeStyle.kt index 81b3a16e0..7a16504a2 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/holder/BadgeStyle.kt +++ b/library/src/main/java/com/mikepenz/materialdrawer/holder/BadgeStyle.kt @@ -15,18 +15,23 @@ import com.mikepenz.materialdrawer.model.utils.BadgeDrawableBuilder open class BadgeStyle { /** defines the drawable to use to define the rounded corners */ var gradientDrawable = R.drawable.material_drawer_badge + /** defines the background drawable */ var badgeBackground: Drawable? = null + /** the default color */ var color: ColorHolder? = null + /** the pressed color */ var colorPressed: ColorHolder? = null + /** * the text size * NOTE: Will only apply on 21+, also if applying, ensure to apply to all views */ var textSizeSp: Float? = null private var _textColor: ColorHolder? = null + /** defines the default text color */ var textColor: ColorHolder? get() = _textColor @@ -36,6 +41,7 @@ open class BadgeStyle { } private var _textColorStateList: ColorStateList? = null + /** defines the alternative text color state list */ var textColorStateList: ColorStateList? get() = _textColorStateList @@ -43,21 +49,26 @@ open class BadgeStyle { _textColor = null _textColorStateList = value } + /** the corner radious */ var corners: DimenHolder? = null + /** dcustom padding to the bottom (default 2dp) */ var paddingTopBottom = DimenHolder.fromDp(2) + /** custom padding to the right (default 3dp) */ var paddingLeftRight = DimenHolder.fromDp(3) + /** the min width to set (default 20dp) */ var minWidth = DimenHolder.fromDp(20) + /** * elevation to apply on the view * NOTE: Will only apply on 21+, also if applying, ensure to apply to all views */ var elevation: DimenHolder? = null - constructor() {} + constructor() constructor(@ColorInt color: Int, @ColorInt colorPressed: Int) { this.color = ColorHolder.fromColor(color) diff --git a/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.kt b/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.kt index f4217b04d..d880e5f62 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.kt +++ b/library/src/main/java/com/mikepenz/materialdrawer/model/AbstractDrawerItem.kt @@ -225,7 +225,6 @@ abstract class AbstractDrawerItem : IDrawerItem * @param holder */ override fun attachToWindow(holder: VH) { - } /** @@ -234,7 +233,6 @@ abstract class AbstractDrawerItem : IDrawerItem * @param holder */ override fun detachFromWindow(holder: VH) { - } /** diff --git a/library/src/main/java/com/mikepenz/materialdrawer/model/SectionDrawerItem.kt b/library/src/main/java/com/mikepenz/materialdrawer/model/SectionDrawerItem.kt index 22b39ce07..f39b2e1dd 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/model/SectionDrawerItem.kt +++ b/library/src/main/java/com/mikepenz/materialdrawer/model/SectionDrawerItem.kt @@ -83,6 +83,5 @@ open class SectionDrawerItem : AbstractDrawerItem T.withEmail(@StringRes emailRes: Int): T { diff --git a/library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.kt b/library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.kt index e7bbd5cc7..c24369900 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.kt +++ b/library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.kt @@ -174,7 +174,6 @@ open class BezelImageView @JvmOverloads constructor(context: Context, attrs: Att mMaskedPaint.colorFilter = mSelectorFilter } else { mMaskedPaint.colorFilter = mDesaturateColorFilter - } } else { mMaskedPaint.colorFilter = null