feat: UI 일괄 수정 (5,6,7,8번)
5. Onboarding 간소화: 4단계→1단계 (Max Volume만) Step 1(자세)/2(위치)/4(최적화) 제거, Continue 바로 완료 6. 자동 reconnect: 앱 시작 시 마지막 기기에 자동 연결 SharedPreferences에 address+name 저장, HomeView에서 autoConnectLastDevice() 7. Demo 모드: DeviceScanView에서 Demo 버튼 제거 8. Android 뒤로가기: BackHandler로 화면별 네비게이션 매핑 Placement→Home, Monitoring→Placement, History/Diary→Monitoring 등 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package com.example.medilightv2android
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.compose.animation.Crossfade
|
||||
@@ -60,6 +61,23 @@ fun MedilightApp(modifier: Modifier = Modifier) {
|
||||
val context = LocalContext.current
|
||||
val appState = remember { AppState(context) }
|
||||
|
||||
// Android 뒤로가기 = 앱 내 뒤로가기
|
||||
BackHandler(enabled = appState.currentScreen != AppScreen.HOME) {
|
||||
when (appState.currentScreen) {
|
||||
AppScreen.SENSOR_SELECT -> appState.currentScreen = AppScreen.HOME
|
||||
AppScreen.DEVICE_SCAN -> appState.currentScreen = AppScreen.SENSOR_SELECT
|
||||
AppScreen.PIEZO_PERSONALIZATION -> appState.currentScreen = AppScreen.DEVICE_SCAN
|
||||
AppScreen.PLACEMENT_GUIDE -> appState.goHome()
|
||||
AppScreen.PIEZO_MONITORING -> appState.currentScreen = AppScreen.PLACEMENT_GUIDE
|
||||
AppScreen.VIVAMYO_MONITORING -> appState.goHome()
|
||||
AppScreen.MEASUREMENT_HISTORY -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.VOIDING_DIARY -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.REMINDER_SETTINGS -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
AppScreen.URINE_CAMERA -> appState.currentScreen = AppScreen.PIEZO_MONITORING
|
||||
else -> appState.currentScreen = AppScreen.HOME
|
||||
}
|
||||
}
|
||||
|
||||
Crossfade(
|
||||
targetState = appState.currentScreen,
|
||||
animationSpec = tween(300),
|
||||
|
||||
Reference in New Issue
Block a user