AT
подскажите пжлст )
есть кастомная кнопка:
class Btn : Button {
constructor(context: Context) : super(context) {
this.typeface = Main.face
this.setTextColor(Main.COLOR_TEXT)
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
this.typeface = Main.face
this.setTextColor(Main.COLOR_TEXT)
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
this.typeface = Main.face
this.setTextColor(Main.COLOR_TEXT)
}
}
куда мне впихунть :
startAnimation(AnimationUtils.loadAnimation(context, R.anim.myalpha))
чтобы после клика отрабатывалась она
override fun setOnClickListener(l: OnClickListener?) {
val wrapper = OnClickListener {
startAnimation(AnimationUtils.loadAnimation(context, R.anim.myalpha))
l?.onClick(it)
}
super.setOnClickListener(wrapper)
}