fix(app-glasses): фон очков чёрный полностью
ConnectionScreen был без фона — светлый MaterialTheme. Теперь darkColorScheme + чёрный Box-корень вокруг обоих экранов + страховка background(Color.Black) в ConnectionScreen. Проверено скрином: все пиксели #000000.
This commit is contained in:
@@ -13,7 +13,9 @@ import android.view.KeyEvent
|
|||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
@@ -22,10 +24,12 @@ import androidx.compose.foundation.lazy.LazyColumn
|
|||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.material3.darkColorScheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.core.view.WindowCompat
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
@@ -74,7 +78,12 @@ class MainActivity : BaseEventActivity() {
|
|||||||
disableTrackpadSounds()
|
disableTrackpadSounds()
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
setContent {
|
setContent {
|
||||||
MaterialTheme {
|
MaterialTheme(colorScheme = darkColorScheme()) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.background(Color.Black)
|
||||||
|
) {
|
||||||
val controller = GlassesApp.instance.movieController
|
val controller = GlassesApp.instance.movieController
|
||||||
val movieActive by controller.movieActive.collectAsState()
|
val movieActive by controller.movieActive.collectAsState()
|
||||||
val title by controller.title.collectAsState()
|
val title by controller.title.collectAsState()
|
||||||
@@ -86,6 +95,7 @@ class MainActivity : BaseEventActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
hideSystemBars()
|
hideSystemBars()
|
||||||
log("ui", "иммерсивный режим включён")
|
log("ui", "иммерсивный режим включён")
|
||||||
val filter = IntentFilter().apply {
|
val filter = IntentFilter().apply {
|
||||||
@@ -236,7 +246,7 @@ fun ConnectionScreen() {
|
|||||||
val messages by connection.messages.collectAsState()
|
val messages by connection.messages.collectAsState()
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.fillMaxSize().padding(24.dp),
|
modifier = Modifier.fillMaxSize().background(Color.Black).padding(24.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
) {
|
) {
|
||||||
Text("ViewMate Glasses", style = MaterialTheme.typography.headlineMedium)
|
Text("ViewMate Glasses", style = MaterialTheme.typography.headlineMedium)
|
||||||
|
|||||||
Reference in New Issue
Block a user