-
public final class ThemeExtKt
-
-
Method Summary
Modifier and Type Method Description final static IntegercolorOf(Context ctx, @ColorRes() Integer colorRes)Get a color. final static IntegercolorOfAttr(Context ctx, @AttrRes() Integer attr)Get a color by a theme attribute. final static IntegercolorOfAttrOrNull(Context ctx, @AttrRes() Integer attr)Get a color by a theme attribute. final static IntegercolorOfAttrs(Context ctx, @AttrRes() Integer attrs)Get a color by a theme attribute. final static IntegercolorOfAttrsOrNull(Context ctx, @AttrRes() Integer attrs)Get a color by a theme attribute. final static BooleanisColorDark(Integer $self, Double threshold)From https://github.com/afollestad/material-dialogs/blob/master/core/src/main/java/com/afollestad/materialdialogs/utils/MDUtil. final static IntegertakeUnlessNotResolved(Integer $self)Returns the same int value if final static FloattakeUnlessNotResolved(Float $self)Returns the same int value if final static IntegergetIconColor(Context ctx)Get color for icons. final static IntegergetPrimaryColor(Context ctx)Get primary color. final static IntegergetHighlightColor(Context ctx)Get highlight color. final static IntegergetHighlightOfColor(@ColorInt() Integer color)Get the highlight color of any color. final static IntegergetTextColor(Context ctx)Get text color. final static IntegergetTextInverseColor(Context ctx)Get text inverse color. final static IntegergetSheetNavigationBarColor(Context ctx)Get navigation bar color. final static IntegergetBottomSheetBackgroundColor(Context ctx, @StyleRes() Integer styleRes)Get background color. final static FloatgetCornerRadius(Context ctx)Get corner radius. final static IntegergetCornerFamily(Context ctx)Get corner family. final static IntegergetCornerFamily(Context ctx, @AttrRes() Integer attr)Get corner family. final static IntegerintOfAttrs(Context ctx, @AttrRes() Integer attrs)Get an Integer value by theme attributes. final static BooleanbooleanOfAttrs(Context ctx, @AttrRes() Integer attrs)Get an Integer value by theme attributes. final static FloatdimensionOfAttrs(Context ctx, @AttrRes() Integer attrs)Get an Integer value by theme attributes. -
-
Method Detail
-
colorOf
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer colorOf(Context ctx, @ColorRes() Integer colorRes)
Get a color.
-
colorOfAttr
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer colorOfAttr(Context ctx, @AttrRes() Integer attr)
Get a color by a theme attribute.
-
colorOfAttrOrNull
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer colorOfAttrOrNull(Context ctx, @AttrRes() Integer attr)
Get a color by a theme attribute.
-
colorOfAttrs
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer colorOfAttrs(Context ctx, @AttrRes() Integer attrs)
Get a color by a theme attribute.
-
colorOfAttrsOrNull
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer colorOfAttrsOrNull(Context ctx, @AttrRes() Integer attrs)
Get a color by a theme attribute.
-
isColorDark
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Boolean isColorDark(Integer $self, Double threshold)
From https://github.com/afollestad/material-dialogs/blob/master/core/src/main/java/com/afollestad/materialdialogs/utils/MDUtil.kt
-
takeUnlessNotResolved
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Integer takeUnlessNotResolved(Integer $self)
Returns the same int value if
-
takeUnlessNotResolved
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Float takeUnlessNotResolved(Float $self)
Returns the same int value if
-
getIconColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getIconColor(Context ctx)
Get color for icons.
-
getPrimaryColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getPrimaryColor(Context ctx)
Get primary color.
-
getHighlightColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getHighlightColor(Context ctx)
Get highlight color.
-
getHighlightOfColor
final static Integer getHighlightOfColor(@ColorInt() Integer color)
Get the highlight color of any color.
-
getTextColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getTextColor(Context ctx)
Get text color.
-
getTextInverseColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getTextInverseColor(Context ctx)
Get text inverse color.
-
getSheetNavigationBarColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getSheetNavigationBarColor(Context ctx)
Get navigation bar color.
-
getBottomSheetBackgroundColor
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP})@ColorInt() final static Integer getBottomSheetBackgroundColor(Context ctx, @StyleRes() Integer styleRes)
Get background color.
-
getCornerRadius
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Float getCornerRadius(Context ctx)
Get corner radius.
-
getCornerFamily
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Integer getCornerFamily(Context ctx)
Get corner family.
-
getCornerFamily
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Integer getCornerFamily(Context ctx, @AttrRes() Integer attr)
Get corner family.
-
intOfAttrs
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Integer intOfAttrs(Context ctx, @AttrRes() Integer attrs)
Get an Integer value by theme attributes.
-
booleanOfAttrs
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Boolean booleanOfAttrs(Context ctx, @AttrRes() Integer attrs)
Get an Integer value by theme attributes.
-
dimensionOfAttrs
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Float dimensionOfAttrs(Context ctx, @AttrRes() Integer attrs)
Get an Integer value by theme attributes.
-
-
-
-