mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
feat: Add video recorder starting info
This commit is contained in:
parent
a0640d13ab
commit
ff8ea3e1f2
@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.CameraAlt
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.Divider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
@ -99,12 +100,19 @@ fun VideoRecordingStatus(
|
||||
}
|
||||
}
|
||||
|
||||
RecordingStatus(
|
||||
recordingTime = videoRecorder.recordingTime,
|
||||
progress = videoRecorder.progress,
|
||||
recordingStart = videoRecorder.recordingStart,
|
||||
maxDuration = videoRecorder.settings.maxDuration,
|
||||
)
|
||||
if (videoRecorder.isStartingRecording) {
|
||||
Text(
|
||||
stringResource(R.string.ui_videoRecorder_info_starting),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
)
|
||||
} else {
|
||||
RecordingStatus(
|
||||
recordingTime = videoRecorder.recordingTime,
|
||||
progress = videoRecorder.progress,
|
||||
recordingStart = videoRecorder.recordingStart,
|
||||
maxDuration = videoRecorder.settings.maxDuration,
|
||||
)
|
||||
}
|
||||
|
||||
Column(
|
||||
verticalArrangement = Arrangement
|
||||
|
@ -11,7 +11,7 @@ import androidx.compose.runtime.setValue
|
||||
@Composable
|
||||
fun rememberInitialRecordingAnimation(recordingTime: Long): Boolean {
|
||||
// Only show animation when the recording has just started
|
||||
val recordingJustStarted = recordingTime <= 1L
|
||||
val recordingJustStarted = recordingTime <= 3L
|
||||
var progressVisible by rememberSaveable { mutableStateOf(!recordingJustStarted) }
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
|
@ -159,4 +159,5 @@
|
||||
<string name="ui_recorder_info_startTime_short">Recording started at %s</string>
|
||||
<string name="ui_recorder_info_startTime_full">Recording started %s</string>
|
||||
<string name="ui_recorder_info_saveNowTime">Saving now will save until %s</string>
|
||||
<string name="ui_videoRecorder_info_starting">Video Recorder is starting...</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user