浏览代码

set to fullscreen - done

Khubaib 1 年之前
父节点
当前提交
78925e01d3

+ 4 - 0
app/src/main/java/com/vpn/fastestvpnservice/screens/bottomNavBarScreens/HelpScreen.kt

@@ -41,9 +41,11 @@ import androidx.compose.ui.tooling.preview.Preview
 import androidx.compose.ui.unit.TextUnit
 import androidx.compose.ui.unit.TextUnit
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import androidx.compose.ui.unit.sp
+import androidx.core.view.WindowCompat
 import androidx.navigation.NavHostController
 import androidx.navigation.NavHostController
 import androidx.navigation.compose.rememberNavController
 import androidx.navigation.compose.rememberNavController
 import com.vpn.fastestvpnservice.R
 import com.vpn.fastestvpnservice.R
+import com.vpn.fastestvpnservice.beans.isDarkTheme
 import com.vpn.fastestvpnservice.sealedClass.Screen
 import com.vpn.fastestvpnservice.sealedClass.Screen
 
 
 @OptIn(ExperimentalFoundationApi::class)
 @OptIn(ExperimentalFoundationApi::class)
@@ -67,6 +69,8 @@ fun Help(navHostController: NavHostController) {
             window.statusBarColor = Color.Transparent.toArgb()
             window.statusBarColor = Color.Transparent.toArgb()
             window.navigationBarColor = Color.Transparent.toArgb()
             window.navigationBarColor = Color.Transparent.toArgb()
 
 
+            WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !isDarkTheme.value
+
             Column(
             Column(
                 verticalArrangement = Arrangement.Top,
                 verticalArrangement = Arrangement.Top,
                 horizontalAlignment = Alignment.Start,
                 horizontalAlignment = Alignment.Start,

+ 14 - 9
app/src/main/java/com/vpn/fastestvpnservice/screens/helpScreensAll/CustomerSupportScreen.kt

@@ -40,6 +40,7 @@ import androidx.compose.runtime.remember
 import androidx.compose.runtime.setValue
 import androidx.compose.runtime.setValue
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.graphics.toArgb
 import androidx.compose.ui.graphics.toArgb
 import androidx.compose.ui.platform.LocalView
 import androidx.compose.ui.platform.LocalView
 import androidx.compose.ui.res.colorResource
 import androidx.compose.ui.res.colorResource
@@ -47,9 +48,11 @@ import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.tooling.preview.Preview
 import androidx.compose.ui.tooling.preview.Preview
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.viewinterop.AndroidView
 import androidx.compose.ui.viewinterop.AndroidView
+import androidx.core.view.WindowCompat
 import androidx.navigation.NavHostController
 import androidx.navigation.NavHostController
 import androidx.navigation.compose.rememberNavController
 import androidx.navigation.compose.rememberNavController
 import com.vpn.fastestvpnservice.R
 import com.vpn.fastestvpnservice.R
+import com.vpn.fastestvpnservice.beans.isDarkTheme
 import kotlinx.coroutines.delay
 import kotlinx.coroutines.delay
 
 
 lateinit var activity1: ComponentActivity
 lateinit var activity1: ComponentActivity
@@ -62,13 +65,14 @@ fun CustomerSupport(navHostController: NavHostController, activity: ComponentAct
     Box(
     Box(
         modifier = Modifier
         modifier = Modifier
             .fillMaxWidth()
             .fillMaxWidth()
-            .background(MaterialTheme.colorScheme.onPrimary)
+            .background(colorResource(id = R.color.white))
             .fillMaxSize()
             .fillMaxSize()
     ) {
     ) {
         val view = LocalView.current
         val view = LocalView.current
         val window = (view.context as Activity).window
         val window = (view.context as Activity).window
-        window.statusBarColor = MaterialTheme.colorScheme.onPrimary.toArgb()
-        window.navigationBarColor = MaterialTheme.colorScheme.onPrimary.toArgb()
+        window.statusBarColor = colorResource(id = R.color.white).toArgb()
+        window.navigationBarColor = colorResource(id = R.color.white).toArgb()
+        WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = true
 
 
         var showLoader by remember { mutableStateOf(true) }
         var showLoader by remember { mutableStateOf(true) }
 
 
@@ -78,10 +82,11 @@ fun CustomerSupport(navHostController: NavHostController, activity: ComponentAct
             modifier = Modifier
             modifier = Modifier
                 .padding(top = 60.dp, bottom = 0.dp)
                 .padding(top = 60.dp, bottom = 0.dp)
                 .fillMaxSize()
                 .fillMaxSize()
-                .background(MaterialTheme.colorScheme.onPrimary)
+                .background(colorResource(id = R.color.white))
         ) {
         ) {
-            window.statusBarColor = MaterialTheme.colorScheme.onPrimary.toArgb()
-            window.navigationBarColor = MaterialTheme.colorScheme.onPrimary.toArgb()
+            window.statusBarColor = colorResource(id = R.color.white).toArgb()
+            window.navigationBarColor = colorResource(id = R.color.white).toArgb()
+            WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = true
 
 
             val email = "sagartestaccount@gmail.com"
             val email = "sagartestaccount@gmail.com"
             val supportUrl = "https://api.fastestvpn.com/v2/chat?device=ios&email=$email"
             val supportUrl = "https://api.fastestvpn.com/v2/chat?device=ios&email=$email"
@@ -197,7 +202,7 @@ fun CustomerSupport(navHostController: NavHostController, activity: ComponentAct
                 Box(
                 Box(
                     modifier = Modifier
                     modifier = Modifier
                         .fillMaxSize()
                         .fillMaxSize()
-                        .background(MaterialTheme.colorScheme.onPrimary)
+                        .background(colorResource(id = R.color.white))
                 ) {
                 ) {
                     CircularProgressIndicator(
                     CircularProgressIndicator(
                         progress = progress,
                         progress = progress,
@@ -239,7 +244,7 @@ fun BoxScope.ShowHeaderCS(navHostController: NavHostController) {
         Icon(
         Icon(
             painter = painterResource(id = R.drawable.backarrow3x),
             painter = painterResource(id = R.drawable.backarrow3x),
             contentDescription = "Arrow-Back",
             contentDescription = "Arrow-Back",
-            tint = MaterialTheme.colorScheme.primary,
+            tint = colorResource(id = R.color.dark_blue_gray_text),
             modifier = Modifier.size(18.dp, 12.dp)
             modifier = Modifier.size(18.dp, 12.dp)
         )
         )
     }
     }
@@ -252,7 +257,7 @@ fun BoxScope.ShowHeaderCS(navHostController: NavHostController) {
         color = colorResource(id = R.color.transparent)
         color = colorResource(id = R.color.transparent)
     ) {
     ) {
         Text(text = "Customer Support",
         Text(text = "Customer Support",
-            color = MaterialTheme.colorScheme.primary,
+            color = colorResource(id = R.color.dark_blue_gray_text),
             style = MaterialTheme.typography.bodyMedium,
             style = MaterialTheme.typography.bodyMedium,
             modifier = Modifier.fillMaxHeight()
             modifier = Modifier.fillMaxHeight()