Selaa lähdekoodia

Set UI of home screen TV of 1st Box

Khubaib 9 kuukautta sitten
vanhempi
commit
229052a882

+ 2 - 2
.idea/deploymentTargetSelector.xml

@@ -4,10 +4,10 @@
     <selectionStates>
       <SelectionState runConfigName="app">
         <option name="selectionMode" value="DROPDOWN" />
-        <DropdownSelection timestamp="2024-07-12T15:02:21.310127177Z">
+        <DropdownSelection timestamp="2024-07-15T12:31:13.549007211Z">
           <Target type="DEFAULT_BOOT">
             <handle>
-              <DeviceId pluginId="Default" identifier="serial=192.168.110.50:5555;connection=433c01d4" />
+              <DeviceId pluginId="Default" identifier="serial=192.168.110.16:5555;connection=eb5344b6" />
             </handle>
           </Target>
         </DropdownSelection>

+ 18 - 14
app/src/main/java/com/vpn/fastestvpnservice/screensTV/HomeScreenTV.kt

@@ -381,11 +381,11 @@ fun HomeTV(navHostController: NavHostController) {
                     modifier = Modifier
                         .fillMaxWidth()
                         .fillMaxHeight()
-                        .padding(bottom = 70.dp)
+                        .padding(bottom = 25.dp)
 //                            .offset(y = -(118).dp)
                         .background(Color.Transparent),
                     horizontalAlignment = Alignment.CenterHorizontally,
-                    verticalArrangement = Arrangement.Top
+                    verticalArrangement = Arrangement.Center
                 ) {
                     val serverObj = basePreferenceHelper.getConnectedServer()
                     val serverDis = basePreferenceHelper.getIpinfo()
@@ -398,10 +398,14 @@ fun HomeTV(navHostController: NavHostController) {
 //                        color = MaterialTheme.colorScheme.primary,
                         color = colorResource(id = R.color.dark_blue_gray_text),
                         style = MaterialTheme.typography.customTypography.headlineLarge.copy(
-                            fontSize = if (isTablet()) 24.sp else 18.sp
+                            fontSize = 18.sp
                         )
                     )
                     Row(
+                        verticalAlignment = Alignment.CenterVertically,
+                        modifier = Modifier
+                            .background(Color.Transparent)
+                            .padding(top = 5.dp)
                     ) {
                         if (isConnect == App.CONNECTED) {
                             val image = Utils.getDrawable(context, serverObj?.iso)
@@ -411,7 +415,7 @@ fun HomeTV(navHostController: NavHostController) {
                                     contentDescription = "Country",
                                     modifier = Modifier
                                         .padding(end = 6.dp)
-                                        .size(if (isTablet()) 26.dp else 20.dp)
+                                        .size(15.dp)
                                         .clip(CircleShape)
                                         .paint(
                                             painter = painterResource(id = image),
@@ -434,7 +438,7 @@ fun HomeTV(navHostController: NavHostController) {
                                     contentDescription = "Server",
                                     modifier = Modifier
                                         .padding(end = 6.dp)
-                                        .size(if (isTablet()) 26.dp else 20.dp)
+                                        .size(15.dp)
                                         .clip(CircleShape)
                                         .paint(
                                             painter = painterResource(id = image),
@@ -458,7 +462,7 @@ fun HomeTV(navHostController: NavHostController) {
                 //                            color = MaterialTheme.colorScheme.surfaceContainerHigh,
                                 color = colorResource(id = R.color.light_blue_2),
                                 style = MaterialTheme.typography.customTypography.displaySmall.copy(
-                                    fontSize = if (isTablet()) 24.sp else 18.sp
+                                    fontSize = 18.sp
                                 )
                             )
                         }
@@ -469,7 +473,7 @@ fun HomeTV(navHostController: NavHostController) {
                 //                            color = MaterialTheme.colorScheme.surfaceTint,
                                 color = colorResource(id = R.color.maroon_text),
                                 style = MaterialTheme.typography.customTypography.displaySmall.copy(
-                                    fontSize = if (isTablet()) 24.sp else 18.sp
+                                    fontSize = 18.sp
                                 )
                             )
                         }
@@ -480,7 +484,7 @@ fun HomeTV(navHostController: NavHostController) {
                 //                            color = MaterialTheme.colorScheme.surfaceTint,
                                 color = colorResource(id = R.color.maroon_text),
                                 style = MaterialTheme.typography.customTypography.displaySmall.copy(
-                                    fontSize = if (isTablet()) 24.sp else 18.sp
+                                    fontSize = 18.sp
                                 )
                             )
                         }
@@ -494,8 +498,8 @@ fun HomeTV(navHostController: NavHostController) {
                         bottom.linkTo(firstComposable.bottom)
                         start.linkTo(parent.start)
                         end.linkTo(parent.end)
-                        width = Dimension.value(180.dp)
-                        height = Dimension.value(180.dp)
+                        width = Dimension.value(150.dp)
+                        height = Dimension.value(150.dp)
                     }
                     .background(Color.Transparent)
             ) {
@@ -559,7 +563,7 @@ fun HomeTV(navHostController: NavHostController) {
                     },
                     modifier = Modifier
                         .padding(bottom = 0.dp)
-                        .size(180.dp)
+                        .size(150.dp)
                         .onKeyEvent {
                             when (it.key) {
                                 Key.DirectionDown -> {
@@ -1052,7 +1056,7 @@ fun ColumnScope.AddText(
         text = text,
         style = style,
         color = color,
-        modifier = Modifier.padding(bottom = if (isTablet()) 15.dp else 0.dp)
+        modifier = Modifier.padding(top = 5.dp)
     )
 }
 
@@ -1087,10 +1091,10 @@ fun RowScope.AddText(
     Text(
         text = text,
         style = MaterialTheme.typography.labelMedium.copy(
-            fontSize = if (isTablet()) 22.sp else 16.sp
+            fontSize = 18.sp
         ),
         color = color,
-        modifier = Modifier.padding(bottom = if (isTablet()) 15.dp else 0.dp)
+        modifier = Modifier.padding(top = 0.dp)
     )
 }
 @Composable