优化TalkBack使用体验

pull/478/head
gedoor 4 years ago
parent df250852a0
commit ba8ae36a45
  1. 2
      app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt

@ -139,6 +139,7 @@ class CircleImageView @JvmOverloads constructor(
DEFAULT_CIRCLE_BACKGROUND_COLOR DEFAULT_CIRCLE_BACKGROUND_COLOR
) )
text = a.getString(R.styleable.CircleImageView_text) text = a.getString(R.styleable.CircleImageView_text)
contentDescription = text
if (a.hasValue(R.styleable.CircleImageView_textColor)) { if (a.hasValue(R.styleable.CircleImageView_textColor)) {
textColor = a.getColor( textColor = a.getColor(
R.styleable.CircleImageView_textColor, R.styleable.CircleImageView_textColor,
@ -226,6 +227,7 @@ class CircleImageView @JvmOverloads constructor(
fun setText(text: String?) { fun setText(text: String?) {
this.text = text this.text = text
contentDescription = text
invalidate() invalidate()
} }

Loading…
Cancel
Save