|
@@ -1,6 +1,8 @@
|
|
|
package com.vpn.fastestvpnservice.screens
|
|
|
|
|
|
+import android.app.Activity
|
|
|
import android.content.res.Configuration
|
|
|
+import android.graphics.drawable.GradientDrawable
|
|
|
import android.util.Log
|
|
|
import androidx.compose.foundation.BorderStroke
|
|
|
import androidx.compose.foundation.Image
|
|
@@ -31,8 +33,11 @@ import androidx.compose.ui.Modifier
|
|
|
import androidx.compose.ui.draw.alpha
|
|
|
import androidx.compose.ui.draw.paint
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
+import androidx.compose.ui.graphics.toArgb
|
|
|
import androidx.compose.ui.layout.ContentScale
|
|
|
import androidx.compose.ui.platform.LocalConfiguration
|
|
|
+import androidx.compose.ui.platform.LocalContext
|
|
|
+import androidx.compose.ui.platform.LocalView
|
|
|
import androidx.compose.ui.res.colorResource
|
|
|
import androidx.compose.ui.res.painterResource
|
|
|
import androidx.compose.ui.text.TextStyle
|
|
@@ -64,12 +69,36 @@ fun Started(navHostController: NavHostController) {
|
|
|
Log.d("test_height", "$screenHeight $firstPart $secondPart")
|
|
|
|
|
|
Column(
|
|
|
- modifier = Modifier.fillMaxSize()
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
.paint(
|
|
|
painter = painterResource(id = if (isDarkTheme.value) R.drawable.bgapp_dark else R.drawable.bg_img3),
|
|
|
contentScale = ContentScale.FillBounds
|
|
|
),
|
|
|
) {
|
|
|
+ val context = LocalContext.current
|
|
|
+ val colors = intArrayOf(
|
|
|
+ context.resources.getColor(R.color.gradientblues),
|
|
|
+ context.resources.getColor(R.color.gradientbluee)
|
|
|
+ )
|
|
|
+ val gradientDrawable = GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM,
|
|
|
+ colors)
|
|
|
+
|
|
|
+ val colorsList = listOf(colorResource(id = R.color.gradientblues), colorResource(id = R.color.gradientbluee))
|
|
|
+ val gradientDrawableList = GradientDrawable(
|
|
|
+ GradientDrawable.Orientation.TOP_BOTTOM,
|
|
|
+ colorsList.map { it.toArgb() }.toIntArray()
|
|
|
+ )
|
|
|
+
|
|
|
+ val view = LocalView.current
|
|
|
+ val window = (view.context as Activity).window
|
|
|
+ window.statusBarColor = Color.Transparent.toArgb()
|
|
|
+ window.navigationBarColor = Color.Transparent.toArgb()
|
|
|
+
|
|
|
+// window.statusBarColor = colorResource(id = R.color.statusbarbluetop).toArgb()
|
|
|
+// window.navigationBarColor = colorResource(id = R.color.statusbarbluebottom).toArgb()
|
|
|
+
|
|
|
+
|
|
|
Box(modifier = Modifier
|
|
|
.fillMaxSize()
|
|
|
.weight(0.6f)
|
|
@@ -110,14 +139,17 @@ fun Started(navHostController: NavHostController) {
|
|
|
) {
|
|
|
Column(
|
|
|
horizontalAlignment = Alignment.CenterHorizontally,
|
|
|
- modifier = Modifier.fillMaxSize().background(Color.Transparent)
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
+ .background(Color.Transparent)
|
|
|
.padding(top = 0.dp),
|
|
|
verticalArrangement = Arrangement.Center
|
|
|
|
|
|
) {
|
|
|
Column (
|
|
|
horizontalAlignment = Alignment.CenterHorizontally,
|
|
|
- modifier = Modifier.padding(top = 0.dp)
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 0.dp)
|
|
|
.background(Color.Transparent)
|
|
|
) {
|
|
|
Text(
|