public void init() {
mPaint = new Paint();
mPaint.setAlpha(100);
setRippleColor(Color.BLACK, 0.2f);
ShapeDrawable normal = new ShapeDrawable(new RectShape());
normal.getPaint().setColor(Color.parseColor("#00FFFFFF"));
StateListDrawable states = new StateListDrawable();
states.addState(new int[] { android.R.attr.state_pressed, android.R.attr.state_enabled },
normal);
states.addState(new int[] { android.R.attr.state_focused, android.R.attr.state_enabled },
normal);
states.addState(new int[] { android.R.attr.state_enabled }, normal);
states.addState(new int[] { -android.R.attr.state_enabled }, normal);
setBackgroundDrawable(states);
}
RippleView.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:OttoFit
作者:
评论列表
文章目录