mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
Remove content description of mic button if it is not visible.
This commit is contained in:
parent
a0730943b4
commit
bf1db5dcf9
1 changed files with 10 additions and 0 deletions
|
@ -20,6 +20,7 @@ import android.content.Context
|
||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
|
import android.view.View
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.view.isInvisible
|
import androidx.core.view.isInvisible
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
@ -87,6 +88,15 @@ class VoiceMessageRecorderView @JvmOverloads constructor(
|
||||||
initListeners()
|
initListeners()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||||
|
super.onVisibilityChanged(changedView, visibility)
|
||||||
|
if (changedView == this && visibility == VISIBLE) {
|
||||||
|
views.voiceMessageMicButton.contentDescription = context.getString(R.string.a11y_start_voice_message)
|
||||||
|
} else {
|
||||||
|
views.voiceMessageMicButton.contentDescription = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun initVoiceRecordingViews() {
|
fun initVoiceRecordingViews() {
|
||||||
recordingState = RecordingState.NONE
|
recordingState = RecordingState.NONE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue