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