/** * Set the background color for the Slider from a Resource. * This is the view containing the list. * * @param sliderBackgroundColorRes * @return */ public DrawerBuilder withSliderBackgroundColorRes(@ColorRes int sliderBackgroundColorRes) { this.mSliderBackgroundColorRes = sliderBackgroundColorRes; return this; }
/** * set the background for the slider as resource * * @param textColorRes * @return */ public AccountHeaderBuilder withTextColorRes(@ColorRes int textColorRes) { this.mTextColor = ColorHolder.fromColorRes(textColorRes); return this; }
public ProfileDrawerItem withSelectedTextColorRes(@ColorRes int selectedColorRes) { this.selectedTextColor = ColorHolder.fromColorRes(selectedColorRes); return this; }
public T withDescriptionTextColorRes(@ColorRes int colorRes) { this.descriptionTextColor = ColorHolder.fromColorRes(colorRes); return (T) this; }
public T withTextColorRes(@ColorRes int textColorRes) { this.textColor = ColorHolder.fromColorRes(textColorRes); return (T) this; }
public T withDisabledTextColorRes(@ColorRes int disabledTextColorRes) { this.disabledTextColor = ColorHolder.fromColorRes(disabledTextColorRes); return (T) this; }
public ProfileSettingDrawerItem withDescriptionTextColorRes(@ColorRes int descriptionColorRes) { this.descriptionTextColor = ColorHolder.fromColorRes(descriptionColorRes); return this; }
public IconDrawerItem withIconColorRes(@ColorRes int iconColorRes) { this.iconColor = ColorHolder.fromColorRes(iconColorRes); return this; }
public T withDescriptionTextColorRes(@ColorRes int colorRes) { this.descriptionTextColor = ColorHolder.fromColorRes(colorRes); return (T) this; }
public ProfileDrawerItem withSelectedColorRes(@ColorRes int selectedColorRes) { this.selectedColor = ColorHolder.fromColorRes(selectedColorRes); return this; }
public BadgeStyle withTextColorRes(@ColorRes int textColor) { this.mTextColor = ColorHolder.fromColorRes(textColor); return this; }
public T withSelectedColorRes(@ColorRes int selectedColorRes) { this.selectedColor = ColorHolder.fromColorRes(selectedColorRes); return (T) this; }
public T withSelectedIconColorRes(@ColorRes int selectedColorRes) { this.selectedIconColor = ColorHolder.fromColorRes(selectedColorRes); return (T) this; }
public BadgeStyle withColorRes(@ColorRes int color) { this.mColor = ColorHolder.fromColorRes(color); return this; }
public IconDrawerItem withSelectedIconColorRes(@ColorRes int selectedColorRes) { this.selectedIconColor = ColorHolder.fromColorRes(selectedColorRes); return this; }
public IconDrawerItem withDisabledIconColorRes(@ColorRes int disabledIconColorRes) { this.disabledIconColor = ColorHolder.fromColorRes(disabledIconColorRes); return this; }
public GridItemDividerDecoration(@NonNull Context context, @DimenRes int dividerSizeResId, @ColorRes int dividerColorResId) { this(context.getResources().getDimensionPixelSize(dividerSizeResId), ContextCompat.getColor(context, dividerColorResId)); }
public void setCircleBackgroundColorResource(@ColorRes int circleBackgroundRes) { setCircleBackgroundColor(getContext().getResources().getColor(circleBackgroundRes)); }
public static ColorHolder fromColorRes(@ColorRes int colorRes) { ColorHolder colorHolder = new ColorHolder(); colorHolder.setColorRes(colorRes); return colorHolder; }
/** * Allows the user to set the nav bar color of their app intro * * @param color int form of color. pass your color resource to here (R.color.your_color) */ public void setNavBarColor(@ColorRes int color) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setNavigationBarColor(ContextCompat.getColor(this, color)); } }