|  | @@ -2,11 +2,13 @@ package com.vpn.fastestvpnservice.screensTV
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import android.app.Activity
 | 
	
		
			
				|  |  |  import android.util.Log
 | 
	
		
			
				|  |  | +import android.widget.Toast
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.ExperimentalFoundationApi
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.Image
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.LocalOverscrollConfiguration
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.background
 | 
	
		
			
				|  |  | -import androidx.compose.foundation.gestures.detectTapGestures
 | 
	
		
			
				|  |  | +import androidx.compose.foundation.clickable
 | 
	
		
			
				|  |  | +import androidx.compose.foundation.focusable
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.layout.Arrangement
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.layout.Box
 | 
	
		
			
				|  |  |  import androidx.compose.foundation.layout.Column
 | 
	
	
		
			
				|  | @@ -28,15 +30,23 @@ import androidx.compose.material3.Surface
 | 
	
		
			
				|  |  |  import androidx.compose.material3.Text
 | 
	
		
			
				|  |  |  import androidx.compose.runtime.Composable
 | 
	
		
			
				|  |  |  import androidx.compose.runtime.CompositionLocalProvider
 | 
	
		
			
				|  |  | +import androidx.compose.runtime.LaunchedEffect
 | 
	
		
			
				|  |  | +import androidx.compose.runtime.getValue
 | 
	
		
			
				|  |  | +import androidx.compose.runtime.mutableStateOf
 | 
	
		
			
				|  |  | +import androidx.compose.runtime.remember
 | 
	
		
			
				|  |  | +import androidx.compose.runtime.setValue
 | 
	
		
			
				|  |  |  import androidx.compose.ui.Alignment
 | 
	
		
			
				|  |  |  import androidx.compose.ui.Modifier
 | 
	
		
			
				|  |  |  import androidx.compose.ui.draw.alpha
 | 
	
		
			
				|  |  |  import androidx.compose.ui.draw.clip
 | 
	
		
			
				|  |  | +import androidx.compose.ui.focus.FocusRequester
 | 
	
		
			
				|  |  | +import androidx.compose.ui.focus.focusRequester
 | 
	
		
			
				|  |  | +import androidx.compose.ui.focus.onFocusChanged
 | 
	
		
			
				|  |  |  import androidx.compose.ui.graphics.Color
 | 
	
		
			
				|  |  |  import androidx.compose.ui.graphics.ColorFilter
 | 
	
		
			
				|  |  |  import androidx.compose.ui.graphics.toArgb
 | 
	
		
			
				|  |  |  import androidx.compose.ui.graphics.vector.ImageVector
 | 
	
		
			
				|  |  | -import androidx.compose.ui.input.pointer.pointerInput
 | 
	
		
			
				|  |  | +import androidx.compose.ui.platform.LocalContext
 | 
	
		
			
				|  |  |  import androidx.compose.ui.platform.LocalView
 | 
	
		
			
				|  |  |  import androidx.compose.ui.res.colorResource
 | 
	
		
			
				|  |  |  import androidx.compose.ui.res.painterResource
 | 
	
	
		
			
				|  | @@ -48,14 +58,17 @@ import androidx.core.view.WindowCompat
 | 
	
		
			
				|  |  |  import androidx.navigation.NavHostController
 | 
	
		
			
				|  |  |  import com.vpn.fastestvpnservice.R
 | 
	
		
			
				|  |  |  import com.vpn.fastestvpnservice.beans.isDarkTheme
 | 
	
		
			
				|  |  | -import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddRow
 | 
	
		
			
				|  |  | -import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddRowIcon
 | 
	
		
			
				|  |  | -import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddTextHelp
 | 
	
		
			
				|  |  |  import com.vpn.fastestvpnservice.sealedClass.Screen
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @OptIn(ExperimentalFoundationApi::class)
 | 
	
		
			
				|  |  |  @Composable
 | 
	
		
			
				|  |  |  fun HelpTV(navHostController: NavHostController) {
 | 
	
		
			
				|  |  | +    val focusRequester1 = remember { FocusRequester() }
 | 
	
		
			
				|  |  | +    val focusRequester2 = remember { FocusRequester() }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    LaunchedEffect(key1 = Unit) {
 | 
	
		
			
				|  |  | +        focusRequester1.requestFocus()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      CompositionLocalProvider(
 | 
	
		
			
				|  |  |          LocalOverscrollConfiguration provides null
 | 
	
	
		
			
				|  | @@ -67,13 +80,11 @@ fun HelpTV(navHostController: NavHostController) {
 | 
	
		
			
				|  |  |                  .padding(vertical = 10.dp)
 | 
	
		
			
				|  |  |                  .verticalScroll(rememberScrollState()),
 | 
	
		
			
				|  |  |  //        contentAlignment = Alignment.Center
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          ) {
 | 
	
		
			
				|  |  |              val view = LocalView.current
 | 
	
		
			
				|  |  |              val window = (view.context as Activity).window
 | 
	
		
			
				|  |  |              window.statusBarColor = Color.Transparent.toArgb()
 | 
	
		
			
				|  |  |              window.navigationBarColor = Color.Transparent.toArgb()
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !isDarkTheme.value
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              Column(
 | 
	
	
		
			
				|  | @@ -90,46 +101,65 @@ fun HelpTV(navHostController: NavHostController) {
 | 
	
		
			
				|  |  |                      color = MaterialTheme.colorScheme.inversePrimary
 | 
	
		
			
				|  |  |                  )
 | 
	
		
			
				|  |  |                  Spacer(modifier = Modifier.height(22.dp))
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |                  AddRowTV(icon = R.drawable.faq3x,
 | 
	
		
			
				|  |  |                      text = "FAQ", navHostController = navHostController,
 | 
	
		
			
				|  |  | -                    topPadding = 22.dp)
 | 
	
		
			
				|  |  | -                {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | +                    topPadding = 22.dp,
 | 
	
		
			
				|  |  | +                    focusRequester1 = focusRequester1,
 | 
	
		
			
				|  |  | +                    onClick = {navHostController.navigate(
 | 
	
		
			
				|  |  |                          Screen.FAQ.route
 | 
	
		
			
				|  |  | -                    )}
 | 
	
		
			
				|  |  | -                AddRowTV(icon = R.drawable.privacy3x,
 | 
	
		
			
				|  |  | -                    text = "Privacy Policy", navHostController = navHostController) {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | +                    )},
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                AddRowTV(
 | 
	
		
			
				|  |  | +                    icon = R.drawable.privacy3x,
 | 
	
		
			
				|  |  | +                    text = "Privacy Policy",
 | 
	
		
			
				|  |  | +                    navHostController = navHostController,
 | 
	
		
			
				|  |  | +                    onClick = {
 | 
	
		
			
				|  |  | +                        navHostController.navigate(
 | 
	
		
			
				|  |  |                          Screen.PrivacyPolicy.route
 | 
	
		
			
				|  |  |                      )
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                AddRowTV(icon = R.drawable.terms3x,
 | 
	
		
			
				|  |  | -                    text = "Terms and Conditions", navHostController = navHostController) {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | -                        Screen.TermsAndConditions.route
 | 
	
		
			
				|  |  | -                    )
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                AddRowTV(icon = R.drawable.about3x,
 | 
	
		
			
				|  |  | -                    text = "About Fastest VPN", navHostController = navHostController) {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | -                        Screen.About.route
 | 
	
		
			
				|  |  | -                    )
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                AddRowIconTV(icon = Icons.AutoMirrored.Filled.Message,
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                AddRowTV(
 | 
	
		
			
				|  |  | +                    icon = R.drawable.terms3x,
 | 
	
		
			
				|  |  | +                    text = "Terms and Conditions",
 | 
	
		
			
				|  |  | +                    navHostController = navHostController,
 | 
	
		
			
				|  |  | +                    onClick = {
 | 
	
		
			
				|  |  | +                        navHostController.navigate(
 | 
	
		
			
				|  |  | +                            Screen.TermsAndConditions.route
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                AddRowTV(
 | 
	
		
			
				|  |  | +                    icon = R.drawable.about3x,
 | 
	
		
			
				|  |  | +                    text = "About Fastest VPN",
 | 
	
		
			
				|  |  | +                    navHostController = navHostController,
 | 
	
		
			
				|  |  | +                    onClick = {
 | 
	
		
			
				|  |  | +                        navHostController.navigate(
 | 
	
		
			
				|  |  | +                            Screen.About.route
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                AddRowTV(
 | 
	
		
			
				|  |  | +                    icon = R.drawable.faq3x,
 | 
	
		
			
				|  |  |                      text = "Customer Support",
 | 
	
		
			
				|  |  | -                    navHostController = navHostController) {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | -                        Screen.CustomerSupport.route
 | 
	
		
			
				|  |  | -                    )
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                AddRowTV(icon = R.drawable.customer_support3x,
 | 
	
		
			
				|  |  | +                    navHostController = navHostController,
 | 
	
		
			
				|  |  | +                    onClick = {
 | 
	
		
			
				|  |  | +                        navHostController.navigate(
 | 
	
		
			
				|  |  | +                            Screen.CustomerSupport.route
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    isIconTV = false
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                AddRowTV(
 | 
	
		
			
				|  |  | +                    icon = R.drawable.customer_support3x,
 | 
	
		
			
				|  |  |                      text = "Email Us",
 | 
	
		
			
				|  |  | -                    navHostController = navHostController) {
 | 
	
		
			
				|  |  | -                    navHostController.navigate(
 | 
	
		
			
				|  |  | -                        Screen.EmailUs.route
 | 
	
		
			
				|  |  | -                    )
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +                    navHostController = navHostController,
 | 
	
		
			
				|  |  | +                    onClick = {
 | 
	
		
			
				|  |  | +                        navHostController.navigate(
 | 
	
		
			
				|  |  | +                            Screen.EmailUs.route
 | 
	
		
			
				|  |  | +                        )
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -141,25 +171,39 @@ fun ColumnScope.AddRowTV(
 | 
	
		
			
				|  |  |      text: String,
 | 
	
		
			
				|  |  |      navHostController: NavHostController,
 | 
	
		
			
				|  |  |      topPadding: Dp = 40.dp,
 | 
	
		
			
				|  |  | -    onClick: () -> Unit
 | 
	
		
			
				|  |  | +    focusRequester1: FocusRequester = FocusRequester(),
 | 
	
		
			
				|  |  | +    onClick: () -> Unit,
 | 
	
		
			
				|  |  | +    isIconTV: Boolean = true
 | 
	
		
			
				|  |  |  ) {
 | 
	
		
			
				|  |  | +    var isRowFocused by remember { mutableStateOf(false) }
 | 
	
		
			
				|  |  | +    val context = LocalContext.current
 | 
	
		
			
				|  |  | +    val icon1 = painterResource(id = icon)
 | 
	
		
			
				|  |  | +    val icon2 = Icons.AutoMirrored.Filled.Message
 | 
	
		
			
				|  |  |      Row(
 | 
	
		
			
				|  |  |          modifier = Modifier
 | 
	
		
			
				|  |  |              .fillMaxWidth()
 | 
	
		
			
				|  |  |              .padding(top = 5.dp)
 | 
	
		
			
				|  |  |              .clip(RoundedCornerShape(4.dp))
 | 
	
		
			
				|  |  | -            .background(Color.White)
 | 
	
		
			
				|  |  | +            .background(if (isRowFocused) Color.LightGray else Color.White)
 | 
	
		
			
				|  |  |              .height(61.dp)
 | 
	
		
			
				|  |  | -            .pointerInput(Unit) {
 | 
	
		
			
				|  |  | -                detectTapGestures {
 | 
	
		
			
				|  |  | -                    Log.d("test_row", "Clicked Row ${onClick().toString()}")
 | 
	
		
			
				|  |  | -                    onClick()
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +            .focusRequester(focusRequester1)
 | 
	
		
			
				|  |  | +            .onFocusChanged {
 | 
	
		
			
				|  |  | +                isRowFocused = it.isFocused
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -//            .clickable {
 | 
	
		
			
				|  |  | -//                Log.d("test_row", "Clicked Row ${onClick.toString()}")
 | 
	
		
			
				|  |  | -//                onClick()
 | 
	
		
			
				|  |  | +            .focusable()
 | 
	
		
			
				|  |  | +//            .pointerInput(Unit) {
 | 
	
		
			
				|  |  | +//                detectTapGestures {
 | 
	
		
			
				|  |  | +//                    Log.d("test_row", "Clicked Row ${onClick().toString()}")
 | 
	
		
			
				|  |  | +//                    onClick()
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  |  //            }
 | 
	
		
			
				|  |  | +            .clickable {
 | 
	
		
			
				|  |  | +                Log.d("test_row", "Clicked Row ${onClick.toString()}")
 | 
	
		
			
				|  |  | +                Toast.makeText(
 | 
	
		
			
				|  |  | +                    context, text, Toast.LENGTH_SHORT
 | 
	
		
			
				|  |  | +                ).show()
 | 
	
		
			
				|  |  | +//                onClick()
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          ,
 | 
	
		
			
				|  |  |          horizontalArrangement = Arrangement.Start,
 | 
	
		
			
				|  |  |          verticalAlignment = Alignment.CenterVertically
 | 
	
	
		
			
				|  | @@ -169,16 +213,29 @@ fun ColumnScope.AddRowTV(
 | 
	
		
			
				|  |  |              modifier = Modifier.padding(start = 20.dp),
 | 
	
		
			
				|  |  |              color = Color.Transparent
 | 
	
		
			
				|  |  |          ) {
 | 
	
		
			
				|  |  | -            Image(
 | 
	
		
			
				|  |  | -                painter = painterResource(id = icon),
 | 
	
		
			
				|  |  | -                contentDescription = "World",
 | 
	
		
			
				|  |  | -                modifier = Modifier
 | 
	
		
			
				|  |  | -                    .padding(start = 0.dp)
 | 
	
		
			
				|  |  | -                    .size(24.dp)
 | 
	
		
			
				|  |  | -                    .weight(1f),
 | 
	
		
			
				|  |  | -                colorFilter = ColorFilter.tint(
 | 
	
		
			
				|  |  | -                    MaterialTheme.colorScheme.inversePrimary)
 | 
	
		
			
				|  |  | -            )
 | 
	
		
			
				|  |  | +            if (isIconTV) {
 | 
	
		
			
				|  |  | +                Image(
 | 
	
		
			
				|  |  | +                    icon1,
 | 
	
		
			
				|  |  | +                    contentDescription = "World",
 | 
	
		
			
				|  |  | +                    modifier = Modifier
 | 
	
		
			
				|  |  | +                        .padding(start = 0.dp)
 | 
	
		
			
				|  |  | +                        .size(24.dp)
 | 
	
		
			
				|  |  | +                        .weight(1f),
 | 
	
		
			
				|  |  | +                    colorFilter = ColorFilter.tint(
 | 
	
		
			
				|  |  | +                        MaterialTheme.colorScheme.inversePrimary)
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                Image(
 | 
	
		
			
				|  |  | +                    icon2,
 | 
	
		
			
				|  |  | +                    contentDescription = "World",
 | 
	
		
			
				|  |  | +                    modifier = Modifier
 | 
	
		
			
				|  |  | +                        .padding(start = 0.dp)
 | 
	
		
			
				|  |  | +                        .size(24.dp)
 | 
	
		
			
				|  |  | +                        .weight(1f),
 | 
	
		
			
				|  |  | +                    colorFilter = ColorFilter.tint(
 | 
	
		
			
				|  |  | +                        MaterialTheme.colorScheme.inversePrimary)
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Surface(
 | 
	
	
		
			
				|  | @@ -229,18 +286,22 @@ fun ColumnScope.AddRowIconTV(
 | 
	
		
			
				|  |  |      topPadding: Dp = 40.dp,
 | 
	
		
			
				|  |  |      onClick: () -> Unit
 | 
	
		
			
				|  |  |  ) {
 | 
	
		
			
				|  |  | +    var isRowFocused by remember { mutableStateOf(false) }
 | 
	
		
			
				|  |  |      Row(
 | 
	
		
			
				|  |  |          modifier = Modifier
 | 
	
		
			
				|  |  |              .fillMaxWidth()
 | 
	
		
			
				|  |  |              .padding(top = 5.dp)
 | 
	
		
			
				|  |  | -            .background(Color.White)
 | 
	
		
			
				|  |  | +            .background(if (isRowFocused) Color.LightGray else Color.White)
 | 
	
		
			
				|  |  |              .height(61.dp)
 | 
	
		
			
				|  |  | -            .pointerInput(Unit) {
 | 
	
		
			
				|  |  | -                detectTapGestures {
 | 
	
		
			
				|  |  | -                    Log.d("test_row", "Clicked Row ${onClick().toString()}")
 | 
	
		
			
				|  |  | -                    onClick()
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +            .onFocusChanged {
 | 
	
		
			
				|  |  | +                isRowFocused = it.isFocused
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +//            .pointerInput(Unit) {
 | 
	
		
			
				|  |  | +//                detectTapGestures {
 | 
	
		
			
				|  |  | +//                    Log.d("test_row", "Clicked Row ${onClick().toString()}")
 | 
	
		
			
				|  |  | +//                    onClick()
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//            }
 | 
	
		
			
				|  |  |  //            .clickable {
 | 
	
		
			
				|  |  |  //                Log.d("test_row", "Clicked Row ${onClick.toString()}")
 | 
	
		
			
				|  |  |  //                onClick()
 |