pref: 过度绘制

This commit is contained in:
HuanCheng65 2023-01-26 14:54:17 +08:00
parent 6cae624890
commit 442a6cd74f
No known key found for this signature in database
GPG Key ID: E9031EF91A805148
7 changed files with 13 additions and 5 deletions

View File

@ -7,6 +7,8 @@ import android.content.BroadcastReceiver
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Build
import android.os.Bundle
import android.os.Handler
@ -163,6 +165,8 @@ class MainActivityV2 : BaseComposeActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
window.decorView.setBackgroundColor(Color.TRANSPARENT)
window.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
}
override fun onCreateContent(systemUiController: SystemUiController) {

View File

@ -648,7 +648,7 @@ fun ForumPage(
)
},
divider = {},
backgroundColor = ExtendedTheme.colors.topBar,
backgroundColor = Color.Transparent,
contentColor = ExtendedTheme.colors.accent,
modifier = Modifier
.width(tabWidth.dp)

View File

@ -15,6 +15,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
@ -57,6 +58,7 @@ fun HistoryPage(
val eventFlow = remember { MutableSharedFlow<HistoryListUiEvent>() }
MyScaffold(
backgroundColor = Color.Transparent,
scaffoldState = scaffoldState,
topBar = {
TitleCentredToolbar(
@ -95,7 +97,7 @@ fun HistoryPage(
)
},
divider = {},
backgroundColor = ExtendedTheme.colors.topBar,
backgroundColor = Color.Transparent,
contentColor = ExtendedTheme.colors.accent,
modifier = Modifier
.width(100.dp * 2)

View File

@ -74,7 +74,7 @@ fun ExplorePage() {
)
},
divider = {},
backgroundColor = ExtendedTheme.colors.topBar,
backgroundColor = Color.Transparent,
contentColor = ExtendedTheme.colors.onTopBar,
modifier = Modifier
.align(Alignment.CenterHorizontally)

View File

@ -67,7 +67,7 @@ fun NotificationsPage() {
)
},
divider = {},
backgroundColor = ExtendedTheme.colors.topBar,
backgroundColor = Color.Transparent,
contentColor = ExtendedTheme.colors.onTopBar,
) {
pages.forEachIndexed { index, pair ->

View File

@ -125,7 +125,7 @@ fun BlockSettingsPage(
)
},
divider = {},
backgroundColor = ExtendedTheme.colors.topBar,
backgroundColor = Color.Transparent,
contentColor = ExtendedTheme.colors.onTopBar,
modifier = Modifier
.align(Alignment.CenterHorizontally)

View File

@ -23,6 +23,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
@ -119,6 +120,7 @@ fun ThreadStorePage(
}
}
MyScaffold(
backgroundColor = Color.Transparent,
scaffoldState = scaffoldState,
topBar = {
TitleCentredToolbar(