/**
* helper to create an StateListDrawable for the given normal and pressed color
*
* @param normalColor the normal color
* @param pressedColor the pressed color
* @return the StateListDrawable
*/
private static StateListDrawable getStateListDrawable(
int normalColor, int pressedColor) {
StateListDrawable states = new StateListDrawable();
states.addState(new int[]{android.R.attr.state_pressed},
new ColorDrawable(pressedColor));
states.addState(new int[]{android.R.attr.state_focused},
new ColorDrawable(pressedColor));
states.addState(new int[]{android.R.attr.state_activated},
new ColorDrawable(pressedColor));
states.addState(new int[]{},
new ColorDrawable(normalColor));
return states;
}
FastAdapterUIUtils.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录