[BugFix]修复录音svga在stop时不显示最原始录音图标的bug
This commit is contained in:
@@ -309,7 +309,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
binding.groupSaveSound.visibility = View.INVISIBLE
|
||||
binding.groupDeleteSound.visibility = View.INVISIBLE
|
||||
binding.tvUnderReview.visibility = View.INVISIBLE
|
||||
binding.svgRecorder.stopAnimation()
|
||||
stopSvga()
|
||||
binding.roundProgress.setProgress(0)
|
||||
}
|
||||
SoundViewModel.STATE_RECORD_RECORDING -> {
|
||||
@@ -328,7 +328,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
binding.groupSaveSound.visibility = View.VISIBLE
|
||||
binding.groupDeleteSound.visibility = View.INVISIBLE
|
||||
binding.tvUnderReview.visibility = View.INVISIBLE
|
||||
binding.svgRecorder.stopAnimation()
|
||||
stopSvga()
|
||||
}
|
||||
SoundViewModel.STATE_RECORD_SAVE_SUCCESS -> {
|
||||
binding.ivSoundStatus.post { binding.ivSoundStatus.setImageResource(R.drawable.ic_pause_record) }
|
||||
@@ -337,7 +337,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
binding.groupSaveSound.visibility = View.INVISIBLE
|
||||
binding.groupDeleteSound.visibility = View.VISIBLE
|
||||
binding.tvUnderReview.visibility = View.VISIBLE
|
||||
binding.svgRecorder.stopAnimation()
|
||||
stopSvga()
|
||||
}
|
||||
SoundViewModel.STATE_RECORD_AUDIT_SUCCESS -> {
|
||||
binding.ivSoundStatus.post { binding.ivSoundStatus.setImageResource(R.drawable.ic_pause_record) }
|
||||
@@ -346,7 +346,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
binding.groupSaveSound.visibility = View.INVISIBLE
|
||||
binding.groupDeleteSound.visibility = View.VISIBLE
|
||||
binding.tvUnderReview.visibility = View.GONE
|
||||
binding.svgRecorder.stopAnimation()
|
||||
stopSvga()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -404,11 +404,16 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
if (isPlaying) {
|
||||
playSvgaBg(binding.svgRecorder, "svga/sound_record.svga")
|
||||
} else {
|
||||
binding.svgRecorder.stopAnimation()
|
||||
stopSvga()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopSvga(){
|
||||
binding.svgRecorder.stopAnimation()
|
||||
binding.svgRecorder.clear()
|
||||
}
|
||||
|
||||
private fun showCountDown(duration: Int) {
|
||||
val showStr = String.format(
|
||||
Locale.getDefault(),
|
||||
@@ -443,8 +448,7 @@ class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBin
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
soundViewModel.releaseResource()
|
||||
binding.svgRecorder.stopAnimation()
|
||||
binding.svgRecorder.clear()
|
||||
stopSvga()
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
|
@@ -618,9 +618,9 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
public void initVoiceShow(UserInfo.SoundBean audioCard) {
|
||||
if (audioCard != null && !TextUtils.isEmpty(audioCard.getAudioUrl())) {
|
||||
if (AuthModel.get().getCurrentUid() == userId) {//主态
|
||||
if (audioCard.getStatus() == 1) {
|
||||
if (audioCard.getStatus() == 2) {
|
||||
showSoundCard(audioCard);
|
||||
} else if (audioCard.getStatus() == 0 || audioCard.getStatus() == 2) {
|
||||
} else if (audioCard.getStatus() == 0 || audioCard.getStatus() == 1) {
|
||||
mBinding.llAudio.setVisibility(View.GONE);
|
||||
mBinding.llAudioTip.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
@@ -213,12 +213,21 @@
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="frDeleteBg,tvDeleteSound" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_sound_record"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSoundTranscribe"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivSoundTranscribe"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSoundTranscribe" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svgRecorder"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_sound_record"
|
||||
app:autoPlay="true"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSoundTranscribe"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
|
||||
|
Reference in New Issue
Block a user