29 lines
957 B
Kotlin
29 lines
957 B
Kotlin
package net.tinsae.tv
|
|
|
|
import android.os.Bundle
|
|
import androidx.activity.ComponentActivity
|
|
import androidx.activity.compose.setContent
|
|
import androidx.appcompat.app.AppCompatDelegate
|
|
import androidx.tv.material3.ExperimentalTvMaterial3Api
|
|
import net.tinsae.tv.ui.screens.MainScreen
|
|
import net.tinsae.tv.ui.theme.TVTheme
|
|
|
|
class MainActivity : ComponentActivity() {
|
|
@OptIn(ExperimentalTvMaterial3Api::class)
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
// Ensure the app starts in dark mode
|
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
|
|
|
// Ensure the window background is transparent to allow SurfaceView (Video)
|
|
// to be visible through the UI layers.
|
|
window.setBackgroundDrawableResource(android.R.color.transparent)
|
|
|
|
setContent {
|
|
TVTheme {
|
|
MainScreen()
|
|
}
|
|
}
|
|
}
|
|
}
|