|
@@ -1,6 +1,7 @@
|
|
|
package com.vpn.fastestvpnservice.screens
|
|
|
|
|
|
import android.app.Activity
|
|
|
+import android.content.Context
|
|
|
import android.content.Intent
|
|
|
import android.content.res.Configuration
|
|
|
import android.location.Location
|
|
@@ -107,6 +108,7 @@ import kotlinx.coroutines.launch
|
|
|
fun SignUp(navHostController: NavHostController) {
|
|
|
val keyboardController = LocalSoftwareKeyboardController.current
|
|
|
val focusManager = LocalFocusManager.current
|
|
|
+ val context = LocalContext.current
|
|
|
|
|
|
val signUpViewModel: SignUpViewModel = viewModel()
|
|
|
var isSignUpEnabled = signUpViewModel.liveDataSignUpStatus.observeAsState().value
|
|
@@ -241,7 +243,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
.align(Alignment.Start)
|
|
|
,
|
|
|
style = MaterialTheme.typography.displayLarge,
|
|
|
- text = "Hello There!",
|
|
|
+ text = context.getString(R.string.hello_there),
|
|
|
color = Color.White,
|
|
|
)
|
|
|
Text(
|
|
@@ -250,7 +252,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
.align(Alignment.Start)
|
|
|
.alpha(0.6F),
|
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
|
- text = "Please register your account.",
|
|
|
+ text = context.getString(R.string.please_register),
|
|
|
color = colorResource(id = R.color.white),
|
|
|
)
|
|
|
Spacer(modifier = Modifier.height(8.dp))
|
|
@@ -288,7 +290,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
// )
|
|
|
// },
|
|
|
label = {
|
|
|
- Text(text = "Email",
|
|
|
+ Text(text = context.getString(R.string.email),
|
|
|
style = MaterialTheme.typography.customTypography.bodySmall
|
|
|
)
|
|
|
},
|
|
@@ -357,7 +359,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
// color = colorResource(id = R.color.white))
|
|
|
// },
|
|
|
label = {
|
|
|
- Text(text = "Password",
|
|
|
+ Text(text = context.getString(R.string.password),
|
|
|
style = MaterialTheme.typography.customTypography.bodyLarge
|
|
|
)
|
|
|
},
|
|
@@ -455,7 +457,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
modifier = Modifier
|
|
|
.padding(start = 15.dp),
|
|
|
style = MaterialTheme.typography.customTypography.bodyLarge,
|
|
|
- text = "By creating your account, you agree to",
|
|
|
+ text = context.getString(R.string.by_creating_acc),
|
|
|
color = colorResource(id = R.color.white),
|
|
|
)
|
|
|
}
|
|
@@ -484,7 +486,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
},
|
|
|
modifier = Modifier
|
|
|
.padding(start = 15.dp),
|
|
|
- text = AnnotatedString("Terms & Conditions"),
|
|
|
+ text = AnnotatedString(context.getString(R.string.termsndcond)),
|
|
|
style = MaterialTheme.typography.customTypography.titleLarge
|
|
|
)
|
|
|
}
|
|
@@ -533,7 +535,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
modifier = Modifier
|
|
|
.padding(0.dp),
|
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
|
- text = "Already have an account? ",
|
|
|
+ text = "${context.getString(R.string.already_have_acc)} ",
|
|
|
color = Color.White,
|
|
|
)
|
|
|
ClickableText(
|
|
@@ -563,7 +565,7 @@ fun SignUp(navHostController: NavHostController) {
|
|
|
modifier = Modifier
|
|
|
.padding(0.dp),
|
|
|
style = MaterialTheme.typography.customTypography.titleMedium,
|
|
|
- text = AnnotatedString(" Sign In"),
|
|
|
+ text = AnnotatedString(" ${context.getString(R.string.signin)}"),
|
|
|
)
|
|
|
}
|
|
|
}
|
|
@@ -723,7 +725,7 @@ fun ColumnScope.SignUpButton(
|
|
|
),
|
|
|
)
|
|
|
{
|
|
|
- Text(text = "Sign Up",
|
|
|
+ Text(text = context.getString(R.string.signup),
|
|
|
style = MaterialTheme.typography.titleMedium,
|
|
|
textAlign = TextAlign.Center
|
|
|
)
|
|
@@ -862,11 +864,9 @@ fun ColumnScope.SignUpButton(
|
|
|
@Preview
|
|
|
@Composable
|
|
|
fun SignUpPreview() {
|
|
|
- SignUp(rememberNavController())
|
|
|
}
|
|
|
|
|
|
@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES)
|
|
|
@Composable
|
|
|
fun SignUpPreviewDark() {
|
|
|
- SignUp(rememberNavController())
|
|
|
}
|