commit
						39db492f81
					
				
									
										Binary file not shown.
									
								
							
						
									
										Binary file not shown.
									
								
							
						
									
										Binary file not shown.
									
								
							
						@ -1 +1 @@ | 
				
			|||||||
{"x86":"dad15d54e348efc1e692d72e72e9d52e","armeabi-v7a":"8745ce95fc4bc9063743a890d92bf411","x86_64":"35dd2701803d69aa66d8ac8f836e0123","arm64-v8a":"30165de860a5f288417d536d542401c3","version":"99.0.4844.88"} | 
					{"x86":"ff4b324fca11309c5e93a45f65970540","armeabi-v7a":"65e8bb0095d5be314ada2f523718f477","x86_64":"3dac75809f86b8edd1399a642bd26f59","arm64-v8a":"ac515c2995b4fb831419313056b1d3f0","version":"100.0.4896.58"} | 
				
			||||||
@ -0,0 +1,40 @@ | 
				
			|||||||
 | 
					package io.legado.app.ui.book.audio | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.view.View | 
				
			||||||
 | 
					import androidx.compose.foundation.layout.fillMaxWidth | 
				
			||||||
 | 
					import androidx.compose.foundation.layout.padding | 
				
			||||||
 | 
					import androidx.compose.material.Card | 
				
			||||||
 | 
					import androidx.compose.material.Slider | 
				
			||||||
 | 
					import androidx.compose.runtime.Composable | 
				
			||||||
 | 
					import androidx.compose.runtime.MutableState | 
				
			||||||
 | 
					import androidx.compose.runtime.mutableStateOf | 
				
			||||||
 | 
					import androidx.compose.runtime.remember | 
				
			||||||
 | 
					import androidx.compose.ui.Modifier | 
				
			||||||
 | 
					import androidx.compose.ui.unit.dp | 
				
			||||||
 | 
					import androidx.compose.ui.window.Dialog | 
				
			||||||
 | 
					import io.legado.app.model.AudioPlay | 
				
			||||||
 | 
					import io.legado.app.service.AudioPlayService | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Composable | 
				
			||||||
 | 
					fun TimerDialog(state: MutableState<Boolean>, parent: View) { | 
				
			||||||
 | 
					    val intOffset = IntArray(2) | 
				
			||||||
 | 
					    parent.getLocationInWindow(intOffset) | 
				
			||||||
 | 
					    if (state.value) { | 
				
			||||||
 | 
					        val timeMinute = remember { | 
				
			||||||
 | 
					            mutableStateOf(AudioPlayService.timeMinute) | 
				
			||||||
 | 
					        } | 
				
			||||||
 | 
					        Dialog(onDismissRequest = { state.value = false }) { | 
				
			||||||
 | 
					            Card(Modifier.fillMaxWidth()) { | 
				
			||||||
 | 
					                Slider( | 
				
			||||||
 | 
					                    modifier = Modifier.padding(horizontal = 16.dp), | 
				
			||||||
 | 
					                    value = timeMinute.value.toFloat(), onValueChange = { | 
				
			||||||
 | 
					                        timeMinute.value = it.toInt() | 
				
			||||||
 | 
					                        AudioPlay.setTimer(it.toInt()) | 
				
			||||||
 | 
					                    }, | 
				
			||||||
 | 
					                    valueRange = 0f..180f | 
				
			||||||
 | 
					                ) | 
				
			||||||
 | 
					            } | 
				
			||||||
 | 
					        } | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					} | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue