1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| class MyTextView : TextView { init { this.gravity = Gravity.LEFT or Gravity.CENTER this.ellipsize = TextUtils.TruncateAt.MARQUEE this.setSingleLine(true) this.isFocusable = true this.isFocusableInTouchMode = true } constructor(context: Context) : super(context) constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) constructor(context: Context, attrs: AttributeSet?, style: Int) : super(context, attrs, style)
override fun isFocused(): Boolean { return true } }
|