show the Pause button on Android 7+, there is no pause before that

This commit is contained in:
tibbi 2020-11-05 18:31:22 +01:00
parent b4e774dad2
commit dab25b08b9
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import android.content.Intent
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.util.AttributeSet import android.util.AttributeSet
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.isNougatPlus
import com.simplemobiletools.voicerecorder.R import com.simplemobiletools.voicerecorder.R
import com.simplemobiletools.voicerecorder.extensions.config import com.simplemobiletools.voicerecorder.extensions.config
import com.simplemobiletools.voicerecorder.helpers.* import com.simplemobiletools.voicerecorder.helpers.*
@ -115,7 +116,7 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
fun gotStatusEvent(event: Events.RecordingStatus) { fun gotStatusEvent(event: Events.RecordingStatus) {
status = event.status status = event.status
toggle_recording_button.setImageDrawable(getToggleButtonIcon()) toggle_recording_button.setImageDrawable(getToggleButtonIcon())
toggle_pause_button.beVisibleIf(status != RECORDING_STOPPED) toggle_pause_button.beVisibleIf(status != RECORDING_STOPPED && isNougatPlus())
if (status == RECORDING_RUNNING) { if (status == RECORDING_RUNNING) {
recorder_visualizer.recreate() recorder_visualizer.recreate()
} }