|
@@ -1,50 +1,31 @@
|
|
package com.vpn.fastestvpnservice.screensTV
|
|
package com.vpn.fastestvpnservice.screensTV
|
|
|
|
|
|
-import android.util.Log
|
|
|
|
-import android.widget.Toast
|
|
|
|
import androidx.compose.foundation.background
|
|
import androidx.compose.foundation.background
|
|
-import androidx.compose.foundation.clickable
|
|
|
|
import androidx.compose.foundation.focusable
|
|
import androidx.compose.foundation.focusable
|
|
import androidx.compose.foundation.layout.Box
|
|
import androidx.compose.foundation.layout.Box
|
|
import androidx.compose.foundation.layout.BoxScope
|
|
import androidx.compose.foundation.layout.BoxScope
|
|
import androidx.compose.foundation.layout.Column
|
|
import androidx.compose.foundation.layout.Column
|
|
-import androidx.compose.foundation.layout.Spacer
|
|
|
|
import androidx.compose.foundation.layout.fillMaxHeight
|
|
import androidx.compose.foundation.layout.fillMaxHeight
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
import androidx.compose.foundation.layout.height
|
|
import androidx.compose.foundation.layout.height
|
|
import androidx.compose.foundation.layout.padding
|
|
import androidx.compose.foundation.layout.padding
|
|
-import androidx.compose.foundation.layout.size
|
|
|
|
import androidx.compose.foundation.lazy.LazyRow
|
|
import androidx.compose.foundation.lazy.LazyRow
|
|
import androidx.compose.foundation.lazy.itemsIndexed
|
|
import androidx.compose.foundation.lazy.itemsIndexed
|
|
import androidx.compose.foundation.rememberScrollState
|
|
import androidx.compose.foundation.rememberScrollState
|
|
import androidx.compose.foundation.verticalScroll
|
|
import androidx.compose.foundation.verticalScroll
|
|
-import androidx.compose.material.icons.Icons
|
|
|
|
-import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
|
|
|
-import androidx.compose.material3.Icon
|
|
|
|
-import androidx.compose.material3.IconButton
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
import androidx.compose.material3.MaterialTheme
|
|
import androidx.compose.material3.Surface
|
|
import androidx.compose.material3.Surface
|
|
import androidx.compose.material3.Text
|
|
import androidx.compose.material3.Text
|
|
import androidx.compose.runtime.Composable
|
|
import androidx.compose.runtime.Composable
|
|
-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.Alignment
|
|
import androidx.compose.ui.Modifier
|
|
import androidx.compose.ui.Modifier
|
|
-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.Color
|
|
import androidx.compose.ui.platform.LocalContext
|
|
import androidx.compose.ui.platform.LocalContext
|
|
import androidx.compose.ui.res.colorResource
|
|
import androidx.compose.ui.res.colorResource
|
|
import androidx.compose.ui.unit.dp
|
|
import androidx.compose.ui.unit.dp
|
|
import androidx.navigation.NavHostController
|
|
import androidx.navigation.NavHostController
|
|
import com.vpn.fastestvpnservice.R
|
|
import com.vpn.fastestvpnservice.R
|
|
-import com.vpn.fastestvpnservice.beans.Server
|
|
|
|
import com.vpn.fastestvpnservice.customItems.ServerItemTV
|
|
import com.vpn.fastestvpnservice.customItems.ServerItemTV
|
|
-import com.vpn.fastestvpnservice.screens.serverListViewModelSplash
|
|
|
|
|
|
|
|
@Composable
|
|
@Composable
|
|
fun ServerListTV(navHostController: NavHostController) {
|
|
fun ServerListTV(navHostController: NavHostController) {
|
|
@@ -58,7 +39,7 @@ fun ServerListTV(navHostController: NavHostController) {
|
|
.padding(bottom = 0.dp)
|
|
.padding(bottom = 0.dp)
|
|
|
|
|
|
) {
|
|
) {
|
|
- HeaderRowSL(navHostController = navHostController)
|
|
|
|
|
|
+ HeaderRowSL(navHostController = navHostController, title = "Locations")
|
|
|
|
|
|
// var locations by remember { mutableStateOf(ArrayList<Server>()) }
|
|
// var locations by remember { mutableStateOf(ArrayList<Server>()) }
|
|
// var dedicatedIP by remember { mutableStateOf(ArrayList<Server>()) }
|
|
// var dedicatedIP by remember { mutableStateOf(ArrayList<Server>()) }
|
|
@@ -205,7 +186,9 @@ fun ServerListTV(navHostController: NavHostController) {
|
|
|
|
|
|
@Composable
|
|
@Composable
|
|
fun BoxScope.HeaderRowSL(
|
|
fun BoxScope.HeaderRowSL(
|
|
- navHostController: NavHostController) {
|
|
|
|
|
|
+ navHostController: NavHostController,
|
|
|
|
+ title: String
|
|
|
|
+) {
|
|
// val focusRequester1 = remember { FocusRequester() }
|
|
// val focusRequester1 = remember { FocusRequester() }
|
|
// var isButtonFocused by remember { mutableStateOf(false) }
|
|
// var isButtonFocused by remember { mutableStateOf(false) }
|
|
// LaunchedEffect(key1 = Unit) {
|
|
// LaunchedEffect(key1 = Unit) {
|
|
@@ -247,7 +230,7 @@ fun BoxScope.HeaderRowSL(
|
|
.padding(5.dp),
|
|
.padding(5.dp),
|
|
color = colorResource(id = R.color.transparent)
|
|
color = colorResource(id = R.color.transparent)
|
|
) {
|
|
) {
|
|
- Text(text = "Locations",
|
|
|
|
|
|
+ Text(text = title,
|
|
style = MaterialTheme.typography.bodyMedium,
|
|
style = MaterialTheme.typography.bodyMedium,
|
|
// color = MaterialTheme.colorScheme.primary,
|
|
// color = MaterialTheme.colorScheme.primary,
|
|
color = colorResource(id = R.color.dark_blue_gray_text),
|
|
color = colorResource(id = R.color.dark_blue_gray_text),
|