Open maoruibin opened 6 years ago
//设置波纹背景 val typedValue = TypedValue() this.theme.resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true) val attribute = intArrayOf(android.R.attr.selectableItemBackground) val typedArray = this.theme.obtainStyledAttributes(typedValue.resourceId, attribute) tipView.background = typedArray.getDrawable(0)
链接:自定义控件属性以及代码设置selectableItemBackground - CSDN博客
链接:自定义控件属性以及代码设置selectableItemBackground - CSDN博客