/**
* Return a color-int from alpha, red, green, blue components.
*
* @param color color.
* @param alpha alpha, alpha component [0..255] of the color.
*/
@ColorInt
public static int getAlphaColor(@ColorInt int color, @IntRange(from = 0, to = 255) int alpha) {
int red = Color.red(color);
int green = Color.green(color);
int blue = Color.blue(color);
return Color.argb(alpha, red, green, blue);
}
java类android.support.annotation.ColorInt的实例源码
AlbumUtils.java 文件源码
项目:Recognize-it
阅读 32
收藏 0
点赞 0
评论 0
FastLoadMoreView.java 文件源码
项目:FastLib
阅读 27
收藏 0
点赞 0
评论 0
/**
* 设置所有TextView 文本颜色
*
* @param mLoadTextColor
* @return
*/
public Builder setLoadTextColor(@ColorInt int mLoadTextColor) {
setLoadingTextColor(mLoadTextColor);
setLoadFailTextColor(mLoadTextColor);
setLoadEndTextColor(mLoadTextColor);
return this;
}
SetupActivity.java 文件源码
项目:SystemUITuner2
阅读 33
收藏 0
点赞 0
评论 0
public static NoRoot newInstance(String title, String description, @SuppressWarnings("SameParameterValue") @DrawableRes int drawable, @ColorInt int color) {
NoRoot fragment = new NoRoot();
Bundle args = new Bundle();
args.putString(ARG_TITLE, title);
args.putString(ARG_DESC, description);
args.putInt(ARG_DRAWABLE, drawable);
args.putInt(ARG_BG_COLOR, color);
fragment.setArguments(args);
return fragment;
}
SpaceTabLayout.java 文件源码
项目:GitHub
阅读 27
收藏 0
点赞 0
评论 0
public void setTabOneTextColor(@ColorInt int tabOneTextColor) {
if (!iconOnly) tabOneTextView.setTextColor(tabOneTextColor);
else throw new IllegalArgumentException("You selected icons only.");
}
ConfirmPopup.java 文件源码
项目:CXJPadProject
阅读 27
收藏 0
点赞 0
评论 0
/**
* 设置顶部标题栏背景颜色
*/
public void setTopBackgroundColor(@ColorInt int topBackgroundColor) {
this.topBackgroundColor = topBackgroundColor;
}
DrawableUtils.java 文件源码
项目:javaide
阅读 35
收藏 0
点赞 0
评论 0
public static Drawable tintDrawable(Drawable d, @ColorInt int color) {
Drawable wd = DrawableCompat.wrap(d);
DrawableCompat.setTint(wd, color);
return wd;
}
ParticlesDrawable.java 文件源码
项目:ParticlesDrawable
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void fillCircle(final float cx, final float cy, final float radius,
@ColorInt final int color) {
mCanvasParticlesView.fillCircle(cx, cy, radius, color);
}
SpaceTabLayout.java 文件源码
项目:GitHub
阅读 24
收藏 0
点赞 0
评论 0
public void setTabThreeTextColor(@ColorInt int tabThreeTextColor) {
if (!iconOnly) tabThreeTextView.setTextColor(tabThreeTextColor);
else throw new IllegalArgumentException("You selected icons only.");
}
BadgeStyle.java 文件源码
项目:android-paypal-example
阅读 27
收藏 0
点赞 0
评论 0
public BadgeStyle setColorPressed(@ColorInt int colorPressed) {
this.colorPressed = colorPressed;
return this;
}
ProSwipeButton.java 文件源码
项目:proSwipeButton
阅读 34
收藏 0
点赞 0
评论 0
@ColorInt
public int getTextColor() {
return this.textColorInt;
}