|
@@ -0,0 +1,179 @@
|
|
|
+package com.vpn.fastestvpnservice.screens.helpScreensAll
|
|
|
+
|
|
|
+import androidx.compose.foundation.background
|
|
|
+import androidx.compose.foundation.border
|
|
|
+import androidx.compose.foundation.layout.Arrangement
|
|
|
+import androidx.compose.foundation.layout.Box
|
|
|
+import androidx.compose.foundation.layout.Column
|
|
|
+import androidx.compose.foundation.layout.ColumnScope
|
|
|
+import androidx.compose.foundation.layout.Row
|
|
|
+import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
+import androidx.compose.foundation.layout.fillMaxSize
|
|
|
+import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
+import androidx.compose.foundation.layout.height
|
|
|
+import androidx.compose.foundation.layout.padding
|
|
|
+import androidx.compose.foundation.layout.size
|
|
|
+import androidx.compose.foundation.layout.wrapContentHeight
|
|
|
+import androidx.compose.foundation.layout.wrapContentSize
|
|
|
+import androidx.compose.foundation.text.KeyboardActions
|
|
|
+import androidx.compose.foundation.text.KeyboardOptions
|
|
|
+import androidx.compose.material.Icon
|
|
|
+import androidx.compose.material.IconButton
|
|
|
+import androidx.compose.material.Surface
|
|
|
+import androidx.compose.material.Text
|
|
|
+import androidx.compose.material3.MaterialTheme
|
|
|
+import androidx.compose.material3.TextField
|
|
|
+import androidx.compose.material3.TextFieldDefaults
|
|
|
+import androidx.compose.runtime.Composable
|
|
|
+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.graphics.Color
|
|
|
+import androidx.compose.ui.platform.LocalFocusManager
|
|
|
+import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
|
|
+import androidx.compose.ui.res.colorResource
|
|
|
+import androidx.compose.ui.res.painterResource
|
|
|
+import androidx.compose.ui.text.input.ImeAction
|
|
|
+import androidx.compose.ui.text.input.KeyboardType
|
|
|
+import androidx.compose.ui.tooling.preview.Preview
|
|
|
+import androidx.compose.ui.unit.dp
|
|
|
+import androidx.navigation.NavHostController
|
|
|
+import androidx.navigation.compose.rememberNavController
|
|
|
+import com.vpn.fastestvpnservice.R
|
|
|
+import com.vpn.fastestvpnservice.ui.theme.customTypography
|
|
|
+
|
|
|
+@Composable
|
|
|
+fun EmailUsScreen(navHostController: NavHostController) {
|
|
|
+ var textChanged by remember { mutableStateOf("") }
|
|
|
+ val keyboardController = LocalSoftwareKeyboardController.current
|
|
|
+ val focusManager = LocalFocusManager.current
|
|
|
+
|
|
|
+ Box(
|
|
|
+ modifier = Modifier
|
|
|
+ .background(MaterialTheme.colorScheme.onPrimary)
|
|
|
+ .fillMaxSize()
|
|
|
+ ) {
|
|
|
+ Column(
|
|
|
+ modifier = Modifier.fillMaxSize()
|
|
|
+ .background(Color.Transparent),
|
|
|
+ verticalArrangement = Arrangement.Top,
|
|
|
+ horizontalAlignment = Alignment.Start
|
|
|
+ ) {
|
|
|
+ ShowHeaderEU(navHostController = navHostController)
|
|
|
+
|
|
|
+ Text(text = "Your message:",
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.bodyMedium,
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(start = 20.dp, top = 25.dp)
|
|
|
+ .align(Alignment.Start)
|
|
|
+ )
|
|
|
+
|
|
|
+ TextField(
|
|
|
+ value = textChanged,
|
|
|
+ onValueChange = {
|
|
|
+ textChanged = it
|
|
|
+ },
|
|
|
+
|
|
|
+ textStyle = MaterialTheme.typography.customTypography.bodyMedium.copy(
|
|
|
+ MaterialTheme.colorScheme.primary
|
|
|
+ ),
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 2.dp, start = 5.dp, end = 5.dp, bottom = 10.dp)
|
|
|
+ .fillMaxWidth()
|
|
|
+ .align(Alignment.Start)
|
|
|
+ .fillMaxHeight()
|
|
|
+// .border(
|
|
|
+// 1.dp,
|
|
|
+// color = colorResource(id = R.color.Black),
|
|
|
+// ),
|
|
|
+ ,
|
|
|
+ colors = TextFieldDefaults.colors(
|
|
|
+ focusedLabelColor = Color.Blue,
|
|
|
+ unfocusedContainerColor = colorResource(id = R.color.transparent),
|
|
|
+ focusedContainerColor = colorResource(id = R.color.transparent),
|
|
|
+ focusedIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ disabledIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ unfocusedIndicatorColor = colorResource(id = R.color.transparent),
|
|
|
+ cursorColor = MaterialTheme.colorScheme.primary
|
|
|
+ ),
|
|
|
+ keyboardOptions = KeyboardOptions(
|
|
|
+ keyboardType = KeyboardType.Email,
|
|
|
+ imeAction = ImeAction.Done
|
|
|
+ ),
|
|
|
+ keyboardActions = KeyboardActions(
|
|
|
+ onDone = {
|
|
|
+ focusManager.clearFocus()
|
|
|
+ keyboardController?.hide()
|
|
|
+ }
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@Composable
|
|
|
+fun ColumnScope.ShowHeaderEU(navHostController: NavHostController) {
|
|
|
+ Row(
|
|
|
+ modifier = Modifier.fillMaxWidth(),
|
|
|
+ horizontalArrangement = Arrangement.SpaceBetween
|
|
|
+ ) {
|
|
|
+ IconButton(
|
|
|
+ onClick = {
|
|
|
+ navHostController.popBackStack()
|
|
|
+ navHostController.popBackStack()
|
|
|
+// navHostController.navigate(BottomBarScreen.Help.route)
|
|
|
+ },
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 10.dp)
|
|
|
+ .padding(start = 16.dp)
|
|
|
+ .size(30.dp, 32.dp)
|
|
|
+ ) {
|
|
|
+ Icon(
|
|
|
+ painter = painterResource(id = R.drawable.backarrow3x),
|
|
|
+ contentDescription = "Arrow-Back",
|
|
|
+ tint = MaterialTheme.colorScheme.primary,
|
|
|
+ modifier = Modifier.size(18.dp, 12.dp)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ Surface(
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 10.dp)
|
|
|
+ .height(32.dp)
|
|
|
+ .padding(5.dp),
|
|
|
+ color = colorResource(id = R.color.transparent)
|
|
|
+ ) {
|
|
|
+ Text(text = "Email Us",
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.bodyMedium,
|
|
|
+ modifier = Modifier.fillMaxHeight()
|
|
|
+ )
|
|
|
+ }
|
|
|
+ IconButton(
|
|
|
+ onClick = {
|
|
|
+
|
|
|
+ },
|
|
|
+ modifier = Modifier
|
|
|
+ .padding(top = 10.dp)
|
|
|
+ .padding(end = 16.dp)
|
|
|
+ .size(30.dp, 32.dp)
|
|
|
+ ) {
|
|
|
+ Icon(
|
|
|
+ painter = painterResource(id = R.drawable.customer_support3x),
|
|
|
+ contentDescription = "Email-Us",
|
|
|
+ tint = MaterialTheme.colorScheme.primary,
|
|
|
+ modifier = Modifier.size(24.dp)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+@Preview
|
|
|
+@Composable
|
|
|
+fun EmailUsScreenPreview() {
|
|
|
+ EmailUsScreen(navHostController = rememberNavController())
|
|
|
+}
|