mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Spruce up the welcome and permission screens in regV5.
This commit is contained in:
committed by
Alex Hart
parent
a1862c3420
commit
7b362460e7
@@ -8,27 +8,31 @@
|
||||
package org.signal.registration.screens.permissions
|
||||
|
||||
import android.Manifest
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
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.material3.Button
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedButton
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.google.accompanist.permissions.ExperimentalPermissionsApi
|
||||
import com.google.accompanist.permissions.MultiplePermissionsState
|
||||
import org.signal.core.ui.compose.Buttons
|
||||
import org.signal.core.ui.compose.DayNightPreviews
|
||||
import org.signal.core.ui.compose.Previews
|
||||
import org.signal.registration.R
|
||||
import org.signal.registration.screens.shared.RegistrationScreen
|
||||
import org.signal.registration.screens.util.MockMultiplePermissionsState
|
||||
import org.signal.registration.screens.util.MockPermissionsState
|
||||
import org.signal.registration.test.TestTags
|
||||
@@ -38,7 +42,7 @@ import org.signal.registration.test.TestTags
|
||||
* Requests necessary runtime permissions before continuing.
|
||||
*
|
||||
* @param permissionsState The permissions state managed at the activity level.
|
||||
* @param onEvent Callback for screen events.
|
||||
* @param onProceed Callback invoked when the user proceeds (either granting or skipping).
|
||||
* @param modifier Modifier to be applied to the root container.
|
||||
*/
|
||||
@Composable
|
||||
@@ -47,102 +51,60 @@ fun PermissionsScreen(
|
||||
onProceed: () -> Unit = {},
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
.fillMaxSize()
|
||||
.padding(24.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
val permissions = permissionsState.permissions.map { it.permission }
|
||||
|
||||
RegistrationScreen(
|
||||
title = stringResource(id = R.string.GrantPermissionsFragment__allow_permissions),
|
||||
subtitle = stringResource(id = R.string.GrantPermissionsFragment__to_help_you_message_people_you_know),
|
||||
modifier = modifier.testTag(TestTags.PERMISSIONS_SCREEN),
|
||||
bottomContent = {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
TextButton(
|
||||
modifier = Modifier
|
||||
.weight(weight = 1f, fill = false)
|
||||
.testTag(TestTags.PERMISSIONS_NOT_NOW_BUTTON),
|
||||
onClick = onProceed
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.GrantPermissionsFragment__not_now)
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.size(24.dp))
|
||||
|
||||
Buttons.LargeTonal(
|
||||
modifier = Modifier.testTag(TestTags.PERMISSIONS_NEXT_BUTTON),
|
||||
onClick = {
|
||||
permissionsState.launchMultiplePermissionRequest()
|
||||
onProceed()
|
||||
}
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.GrantPermissionsFragment__next)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
) {
|
||||
Text(
|
||||
text = "Permissions",
|
||||
style = MaterialTheme.typography.headlineLarge,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text(
|
||||
text = "Signal needs the following permissions to provide the best experience:",
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
textAlign = TextAlign.Center,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
PermissionsList(permissions = permissionsState.permissions.map { it.permission })
|
||||
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
|
||||
Button(
|
||||
onClick = {
|
||||
permissionsState.launchMultiplePermissionRequest()
|
||||
onProceed()
|
||||
},
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag(TestTags.PERMISSIONS_NEXT_BUTTON)
|
||||
) {
|
||||
Text("Next")
|
||||
}
|
||||
|
||||
OutlinedButton(
|
||||
onClick = { onProceed() },
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag(TestTags.PERMISSIONS_NOT_NOW_BUTTON)
|
||||
) {
|
||||
Text("Not now")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a list of permission explanations.
|
||||
*/
|
||||
@Composable
|
||||
private fun PermissionsList(
|
||||
permissions: List<String>,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
||||
) {
|
||||
val permissionDescriptions = getPermissionDescriptions(permissions)
|
||||
permissionDescriptions.forEach { description ->
|
||||
PermissionItem(description = description)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Individual permission item with description.
|
||||
*/
|
||||
@Composable
|
||||
private fun PermissionItem(
|
||||
description: String,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Text(
|
||||
text = "• $description",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = modifier.fillMaxWidth()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts permission names to user-friendly descriptions.
|
||||
*/
|
||||
private fun getPermissionDescriptions(permissions: List<String>): List<String> {
|
||||
return buildList {
|
||||
if (permissions.any { it == Manifest.permission.POST_NOTIFICATIONS }) {
|
||||
add("Notifications - Stay updated with new messages")
|
||||
PermissionRow(
|
||||
imageVector = ImageVector.vectorResource(id = R.drawable.permission_notification),
|
||||
title = stringResource(id = R.string.GrantPermissionsFragment__notifications),
|
||||
subtitle = stringResource(id = R.string.GrantPermissionsFragment__get_notified_when)
|
||||
)
|
||||
}
|
||||
|
||||
if (permissions.any { it == Manifest.permission.READ_CONTACTS || it == Manifest.permission.WRITE_CONTACTS }) {
|
||||
add("Contacts - Find friends who use Signal")
|
||||
PermissionRow(
|
||||
imageVector = ImageVector.vectorResource(id = R.drawable.permission_contact),
|
||||
title = stringResource(id = R.string.GrantPermissionsFragment__contacts),
|
||||
subtitle = stringResource(id = R.string.GrantPermissionsFragment__find_people_you_know)
|
||||
)
|
||||
}
|
||||
|
||||
if (permissions.any {
|
||||
it == Manifest.permission.READ_EXTERNAL_STORAGE ||
|
||||
it == Manifest.permission.WRITE_EXTERNAL_STORAGE ||
|
||||
@@ -151,14 +113,54 @@ private fun getPermissionDescriptions(permissions: List<String>): List<String> {
|
||||
it == Manifest.permission.READ_MEDIA_AUDIO
|
||||
}
|
||||
) {
|
||||
add("Photos and media - Share images and videos")
|
||||
PermissionRow(
|
||||
imageVector = ImageVector.vectorResource(id = R.drawable.permission_file),
|
||||
title = stringResource(id = R.string.GrantPermissionsFragment__storage),
|
||||
subtitle = stringResource(id = R.string.GrantPermissionsFragment__send_photos_videos_and_files)
|
||||
)
|
||||
}
|
||||
|
||||
if (permissions.any { it == Manifest.permission.READ_PHONE_STATE || it == Manifest.permission.READ_PHONE_NUMBERS }) {
|
||||
add("Phone - Verify your phone number")
|
||||
PermissionRow(
|
||||
imageVector = ImageVector.vectorResource(id = R.drawable.permission_phone),
|
||||
title = stringResource(id = R.string.GrantPermissionsFragment__phone_calls),
|
||||
subtitle = stringResource(id = R.string.GrantPermissionsFragment__make_registering_easier)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun PermissionRow(
|
||||
imageVector: ImageVector,
|
||||
title: String,
|
||||
subtitle: String
|
||||
) {
|
||||
Row(modifier = Modifier.padding(bottom = 32.dp)) {
|
||||
Image(
|
||||
imageVector = imageVector,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(48.dp)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.size(16.dp))
|
||||
|
||||
Column {
|
||||
Text(
|
||||
text = title,
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
|
||||
Text(
|
||||
text = subtitle,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.size(32.dp))
|
||||
}
|
||||
}
|
||||
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun PermissionsScreenPreview() {
|
||||
|
||||
@@ -76,7 +76,7 @@ fun PhoneNumberScreen(
|
||||
)
|
||||
}
|
||||
|
||||
Box(modifier = modifier.fillMaxSize()) {
|
||||
Box(modifier = modifier.fillMaxSize().testTag(TestTags.PHONE_NUMBER_SCREEN)) {
|
||||
ScreenContent(state, onEvent)
|
||||
|
||||
if (state.showFullScreenSpinner) {
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright 2025 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.signal.registration.screens.shared
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxScope
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.signal.core.ui.compose.DayNightPreviews
|
||||
import org.signal.core.ui.compose.Previews
|
||||
import org.signal.core.ui.compose.horizontalGutters
|
||||
|
||||
/**
|
||||
* A base framework for rendering the various registration screens.
|
||||
*/
|
||||
@Composable
|
||||
fun RegistrationScreen(
|
||||
title: String,
|
||||
subtitle: String,
|
||||
bottomContent: @Composable (BoxScope.() -> Unit),
|
||||
modifier: Modifier = Modifier,
|
||||
mainContent: @Composable ColumnScope.() -> Unit
|
||||
) {
|
||||
Surface(modifier = modifier) {
|
||||
Column(
|
||||
verticalArrangement = Arrangement.SpaceBetween,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.fillMaxHeight()
|
||||
) {
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.verticalScroll(scrollState)
|
||||
.weight(weight = 1f, fill = false)
|
||||
.padding(bottom = 16.dp)
|
||||
.horizontalGutters()
|
||||
) {
|
||||
Spacer(Modifier.height(40.dp))
|
||||
|
||||
Text(
|
||||
text = title,
|
||||
style = MaterialTheme.typography.headlineMedium,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
|
||||
Text(
|
||||
text = subtitle,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(top = 16.dp)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(40.dp))
|
||||
|
||||
mainContent()
|
||||
}
|
||||
|
||||
Surface(
|
||||
shadowElevation = if (scrollState.canScrollForward) 8.dp else 0.dp,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(top = 8.dp, bottom = 24.dp)
|
||||
.horizontalGutters()
|
||||
) {
|
||||
bottomContent()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun RegistrationScreenPreview() {
|
||||
Previews.Preview {
|
||||
RegistrationScreen(
|
||||
title = "Title",
|
||||
subtitle = "Subtitle",
|
||||
bottomContent = {
|
||||
TextButton(onClick = {}) {
|
||||
Text("Bottom Button")
|
||||
}
|
||||
}
|
||||
) {
|
||||
Text("Main content")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,19 +7,19 @@
|
||||
|
||||
package org.signal.registration.screens.welcome
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
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.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedButton
|
||||
import androidx.compose.material3.SheetState
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.rememberModalBottomSheetState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
@@ -29,14 +29,20 @@ import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import org.signal.core.ui.compose.BottomSheets
|
||||
import org.signal.core.ui.compose.Buttons
|
||||
import org.signal.core.ui.compose.DayNightPreviews
|
||||
import org.signal.core.ui.compose.Previews
|
||||
import org.signal.core.ui.compose.dismissWithAnimation
|
||||
import org.signal.core.ui.compose.theme.SignalTheme
|
||||
import org.signal.registration.R
|
||||
import org.signal.registration.test.TestTags
|
||||
|
||||
/**
|
||||
@@ -53,34 +59,70 @@ fun WelcomeScreen(
|
||||
Column(
|
||||
modifier = modifier
|
||||
.fillMaxSize()
|
||||
.padding(24.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
.testTag(TestTags.WELCOME_SCREEN),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text(
|
||||
text = "Welcome to Signal",
|
||||
style = MaterialTheme.typography.headlineLarge,
|
||||
textAlign = TextAlign.Center
|
||||
Image(
|
||||
painter = painterResource(R.drawable.welcome),
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.fillMaxWidth()
|
||||
.padding(16.dp),
|
||||
contentScale = ContentScale.Fit
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.RegistrationActivity_take_privacy_with_you_be_yourself_in_every_message),
|
||||
style = MaterialTheme.typography.headlineMedium,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 32.dp)
|
||||
.testTag(TestTags.WELCOME_HEADLINE)
|
||||
)
|
||||
|
||||
Button(
|
||||
Spacer(modifier = Modifier.height(40.dp))
|
||||
|
||||
TextButton(
|
||||
onClick = { /* Terms & Privacy link */ },
|
||||
colors = ButtonDefaults.textButtonColors(
|
||||
contentColor = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.RegistrationActivity_terms_and_privacy),
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
Buttons.LargeTonal(
|
||||
onClick = { onEvent(WelcomeScreenEvents.Continue) },
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 32.dp)
|
||||
.testTag(TestTags.WELCOME_GET_STARTED_BUTTON)
|
||||
) {
|
||||
Text("Get Started")
|
||||
Text(stringResource(R.string.RegistrationActivity_continue))
|
||||
}
|
||||
OutlinedButton(
|
||||
|
||||
Spacer(modifier = Modifier.height(17.dp))
|
||||
|
||||
Buttons.LargeTonal(
|
||||
onClick = { showBottomSheet = true },
|
||||
colors = ButtonDefaults.filledTonalButtonColors(
|
||||
containerColor = SignalTheme.colors.colorSurface2
|
||||
),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 32.dp)
|
||||
.testTag(TestTags.WELCOME_RESTORE_OR_TRANSFER_BUTTON)
|
||||
) {
|
||||
Text("Restore or transfer")
|
||||
Text(stringResource(R.string.registration_activity__restore_or_transfer))
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
}
|
||||
|
||||
if (showBottomSheet) {
|
||||
@@ -130,9 +172,9 @@ private fun RestoreOrTransferBottomSheetContent(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 24.dp, vertical = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Button(
|
||||
Buttons.LargeTonal(
|
||||
onClick = {
|
||||
sheetState.dismissWithAnimation(scope) {
|
||||
onEvent(WelcomeScreenEvents.HasOldPhone)
|
||||
@@ -145,9 +187,10 @@ private fun RestoreOrTransferBottomSheetContent(
|
||||
Text("I have my old phone")
|
||||
}
|
||||
|
||||
Button(
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
|
||||
Buttons.LargeTonal(
|
||||
onClick = {
|
||||
onEvent(WelcomeScreenEvents.DoesNotHaveOldPhone)
|
||||
sheetState.dismissWithAnimation(scope) {
|
||||
onEvent(WelcomeScreenEvents.DoesNotHaveOldPhone)
|
||||
}
|
||||
|
||||
@@ -11,16 +11,20 @@ package org.signal.registration.test
|
||||
object TestTags {
|
||||
|
||||
// Welcome Screen
|
||||
const val WELCOME_SCREEN = "welcome_screen"
|
||||
const val WELCOME_HEADLINE = "welcome_headline"
|
||||
const val WELCOME_GET_STARTED_BUTTON = "welcome_get_started_button"
|
||||
const val WELCOME_RESTORE_OR_TRANSFER_BUTTON = "welcome_restore_or_transfer_button"
|
||||
const val WELCOME_RESTORE_HAS_OLD_PHONE_BUTTON = "welcome_restore_has_old_phone_button"
|
||||
const val WELCOME_RESTORE_NO_OLD_PHONE_BUTTON = "welcome_restore_no_old_phone_button"
|
||||
|
||||
// Permissions Screen
|
||||
const val PERMISSIONS_SCREEN = "permissions_screen"
|
||||
const val PERMISSIONS_NEXT_BUTTON = "permissions_next_button"
|
||||
const val PERMISSIONS_NOT_NOW_BUTTON = "permissions_not_now_button"
|
||||
|
||||
// Phone Number Screen
|
||||
const val PHONE_NUMBER_SCREEN = "phone_number_screen"
|
||||
const val PHONE_NUMBER_COUNTRY_PICKER = "phone_number_country_picker"
|
||||
const val PHONE_NUMBER_COUNTRY_CODE_FIELD = "phone_number_country_code_field"
|
||||
const val PHONE_NUMBER_PHONE_FIELD = "phone_number_phone_field"
|
||||
|
||||
BIN
feature/registration/src/main/res/drawable-hdpi/welcome.webp
Normal file
BIN
feature/registration/src/main/res/drawable-hdpi/welcome.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
feature/registration/src/main/res/drawable-mdpi/welcome.webp
Normal file
BIN
feature/registration/src/main/res/drawable-mdpi/welcome.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
BIN
feature/registration/src/main/res/drawable-xhdpi/welcome.webp
Normal file
BIN
feature/registration/src/main/res/drawable-xhdpi/welcome.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
feature/registration/src/main/res/drawable-xxhdpi/welcome.webp
Normal file
BIN
feature/registration/src/main/res/drawable-xxhdpi/welcome.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
feature/registration/src/main/res/drawable-xxxhdpi/welcome.webp
Normal file
BIN
feature/registration/src/main/res/drawable-xxxhdpi/welcome.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M24,24m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M24,27.75c3.59,0 6.5,-3.772 6.5,-8.121C30.5,15.279 27.59,12 24,12s-6.5,3.28 -6.5,7.629c0,4.35 2.91,8.121 6.5,8.121ZM24,44a19.92,19.92 0,0 0,13.139 -4.921c-2.82,-3.513 -7.652,-5.829 -13.14,-5.829 -5.486,0 -10.318,2.316 -13.138,5.829A19.923,19.923 0,0 0,24 44Z"
|
||||
android:fillColor="#E3E9F5"/>
|
||||
<path
|
||||
android:pathData="M24,11c-4.276,0 -7.5,3.871 -7.5,8.629 0,2.39 0.798,4.642 2.12,6.312 1.321,1.67 3.214,2.809 5.38,2.809s4.059,-1.139 5.38,-2.81c1.322,-1.67 2.12,-3.92 2.12,-6.311C31.5,14.87 28.276,11 24,11ZM18.5,19.629C18.5,15.689 21.096,13 24,13s5.5,2.688 5.5,6.629c0,1.958 -0.657,3.768 -1.688,5.07 -1.03,1.304 -2.388,2.051 -3.812,2.051s-2.781,-0.747 -3.812,-2.05c-1.031,-1.303 -1.688,-3.113 -1.688,-5.071Z"
|
||||
android:fillColor="#7282A5"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M3,24C3,12.402 12.402,3 24,3s21,9.402 21,21 -9.402,21 -21,21S3,35.598 3,24ZM24,5C13.507,5 5,13.507 5,24a18.944,18.944 0,0 0,5.78 13.646c3.085,-3.31 7.884,-5.396 13.22,-5.396s10.135,2.087 13.22,5.396A18.944,18.944 0,0 0,43 24c0,-10.493 -8.507,-19 -19,-19ZM24,43a18.918,18.918 0,0 1,-11.712 -4.038C14.964,36.122 19.19,34.25 24,34.25s9.036,1.872 11.712,4.712A18.918,18.918 0,0 1,24 43Z"
|
||||
android:fillColor="#7282A5"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,19 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M33.4,12c3.36,0 5.04,0 6.324,0.654a6,6 0,0 1,2.622 2.622C43,16.56 43,18.24 43,21.6v8.8c0,3.36 0,5.04 -0.654,6.324a6,6 0,0 1,-2.622 2.622C38.44,40 36.76,40 33.4,40H14.6c-3.36,0 -5.04,0 -6.324,-0.654a6,6 0,0 1,-2.622 -2.622C5,35.44 5,33.76 5,30.4v-8.8c0,-3.36 0,-5.04 0.654,-6.324a6,6 0,0 1,2.622 -2.622C9.56,12 11.24,12 14.6,12h18.8Z"
|
||||
android:fillColor="#FFEABC"/>
|
||||
<path
|
||||
android:pathData="M5,21.6v8.8c0,3.36 0,5.04 0.654,6.324a6,6 0,0 0,2.622 2.622C9.56,40 11.24,40 14.6,40h18.943c3.265,0 4.916,-0.01 6.18,-0.654 0.452,-0.23 0.869,-0.514 1.244,-0.844L7.033,13.498a5.998,5.998 0,0 0,-1.379 1.778C5,16.56 5,18.24 5,21.6Z"
|
||||
android:fillColor="#FFE3A5"/>
|
||||
<path
|
||||
android:pathData="M5.026,18.681c0.051,-1.548 0.199,-2.562 0.628,-3.405a6,6 0,0 1,2.622 -2.622C9.56,12 11.24,12 14.6,12h7.891c-0.073,-0.163 -0.166,-0.35 -0.32,-0.658 -0.495,-0.99 -0.743,-1.485 -1.048,-1.9a6,6 0,0 0,-3.81 -2.354C16.806,7 16.253,7 15.146,7H14c-2.796,0 -4.193,0 -5.296,0.457a6,6 0,0 0,-3.247 3.247C5,11.806 5,13.204 5,16c0,1.082 0,1.954 0.026,2.681Z"
|
||||
android:fillColor="#E9C576"/>
|
||||
<path
|
||||
android:pathData="M4,21.473v-4.94c0,-1.632 0,-2.918 0.084,-3.953 0.086,-1.055 0.264,-1.937 0.67,-2.74A7,7 0,0 1,7.84 6.755c0.802,-0.406 1.684,-0.584 2.74,-0.67C11.615,6 12.9,6 14.533,6h2.551a6.15,6.15 0,0 1,5.274 2.986A4.15,4.15 0,0 0,25.912 11h7.532c1.643,0 2.937,0 3.978,0.085 1.063,0.087 1.95,0.267 2.756,0.678a7,7 0,0 1,3.059 3.06c0.41,0.805 0.591,1.692 0.678,2.755 0.085,1.041 0.085,2.335 0.085,3.978v8.888c0,1.643 0,2.937 -0.085,3.978 -0.087,1.063 -0.267,1.95 -0.678,2.756a7,7 0,0 1,-3.06 3.059c-0.805,0.41 -1.692,0.591 -2.755,0.678 -1.041,0.085 -2.335,0.085 -3.978,0.085L14.556,41c-1.643,0 -2.937,0 -3.978,-0.085 -1.063,-0.087 -1.95,-0.267 -2.756,-0.678a7,7 0,0 1,-3.059 -3.06c-0.41,-0.805 -0.591,-1.692 -0.678,-2.755C4,33.381 4,32.087 4,30.444v-8.97ZM25.912,13L14.6,13c-1.697,0 -2.909,0 -3.86,0.078 -0.938,0.077 -1.533,0.224 -2.01,0.467a5,5 0,0 0,-2.185 2.185c-0.243,0.477 -0.39,1.072 -0.467,2.01 -0.076,0.931 -0.078,2.112 -0.078,3.754L6,30.4c0,1.697 0,2.909 0.078,3.86 0.077,0.938 0.224,1.533 0.467,2.01a5,5 0,0 0,2.185 2.185c0.477,0.243 1.072,0.39 2.01,0.467 0.951,0.077 2.163,0.078 3.86,0.078h18.8c1.697,0 2.909,0 3.86,-0.078 0.938,-0.077 1.533,-0.224 2.01,-0.467a5,5 0,0 0,2.185 -2.185c0.243,-0.477 0.39,-1.072 0.467,-2.01 0.077,-0.951 0.078,-2.163 0.078,-3.86v-8.8c0,-1.697 0,-2.909 -0.078,-3.86 -0.077,-0.938 -0.224,-1.533 -0.467,-2.01a5,5 0,0 0,-2.185 -2.185c-0.477,-0.243 -1.072,-0.39 -2.01,-0.467 -0.951,-0.077 -2.163,-0.078 -3.86,-0.078h-7.488ZM21.377,11c-0.274,-0.3 -0.52,-0.63 -0.735,-0.986A4.15,4.15 0,0 0,17.084 8h-2.507c-1.685,0 -2.89,0 -3.835,0.077 -0.933,0.076 -1.524,0.221 -1.999,0.461a5,5 0,0 0,-2.205 2.205c-0.24,0.475 -0.385,1.066 -0.46,2a15.71,15.71 0,0 0,-0.022 0.301,7 7,0 0,1 1.766,-1.281c0.806,-0.41 1.693,-0.591 2.756,-0.678C11.619,11 12.913,11 14.556,11h6.82Z"
|
||||
android:fillColor="#9C7A2D"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,22 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M17,36.5c0,3.967 3.033,7 7,7s7,-3.033 7,-7"
|
||||
android:fillColor="#E9C576"/>
|
||||
<path
|
||||
android:pathData="M5.25,33.403c0,1.71 1.361,3.097 3.04,3.097h31.42c1.679,0 3.04,-1.386 3.04,-3.097 0,-4.325 -5.557,-1.548 -6.081,-16.516C36.416,9.647 30.717,4.5 24,4.5c-6.717,0 -12.416,5.147 -12.669,12.387 -0.524,14.968 -6.081,12.19 -6.081,16.516Z"
|
||||
android:fillColor="#FFEABC"/>
|
||||
<path
|
||||
android:pathData="M8.29,36.5c-1.679,0 -3.04,-1.386 -3.04,-3.097 0,-1.528 0.694,-2.17 1.615,-3.021 1.53,-1.415 3.687,-3.41 4.323,-11.022A20.908,20.908 0,0 1,24 15c4.823,0 9.267,1.626 12.812,4.36 0.636,7.613 2.793,9.607 4.323,11.022 0.921,0.851 1.615,1.493 1.615,3.021 0,1.71 -1.361,3.097 -3.04,3.097H8.29Z"
|
||||
android:fillColor="#FFE3A5"/>
|
||||
<path
|
||||
android:pathData="M10.707,3.293a1,1 0,0 1,0 1.414c-2.355,2.356 -4.24,5.65 -4.713,9.903a1,1 0,0 1,-1.988 -0.22c0.528,-4.748 2.642,-8.453 5.287,-11.097a1,1 0,0 1,1.414 0ZM37.293,3.293a1,1 0,0 0,0 1.414c2.355,2.356 4.24,5.65 4.713,9.903a1,1 0,0 0,1.988 -0.22c-0.527,-4.748 -2.642,-8.453 -5.287,-11.097a1,1 0,0 0,-1.414 0Z"
|
||||
android:fillColor="#9C7A2D"/>
|
||||
<path
|
||||
android:pathData="M10.332,16.852C10.604,9.064 16.755,3.5 24,3.5c7.245,0 13.396,5.564 13.668,13.352 0.258,7.364 1.747,10.157 3,11.638 0.326,0.383 0.651,0.698 0.977,1.001l0.155,0.144 0.004,0.003c0.27,0.25 0.558,0.516 0.81,0.792 0.67,0.738 1.136,1.608 1.136,2.973 0,2.245 -1.792,4.097 -4.04,4.097h-7.768c-0.471,4.022 -3.763,7 -7.942,7 -4.18,0 -7.471,-2.978 -7.942,-7L8.29,37.5c-2.25,0 -4.041,-1.852 -4.041,-4.097 0,-1.365 0.466,-2.235 1.137,-2.973 0.25,-0.276 0.54,-0.543 0.809,-0.792l0.159,-0.147c0.326,-0.303 0.651,-0.618 0.976,-1.001 1.254,-1.48 2.743,-4.274 3,-11.638ZM24,5.5c-6.189,0 -11.435,4.731 -11.67,11.422 -0.266,7.604 -1.817,10.906 -3.473,12.86a13.45,13.45 0,0 1,-1.14 1.173l-0.184,0.171c-0.268,0.248 -0.48,0.444 -0.667,0.65 -0.387,0.425 -0.616,0.83 -0.616,1.627 0,1.176 0.93,2.097 2.04,2.097h31.42c1.11,0 2.04,-0.921 2.04,-2.097 0,-0.797 -0.23,-1.202 -0.616,-1.627 -0.187,-0.206 -0.399,-0.402 -0.667,-0.65l-0.184,-0.17c-0.344,-0.32 -0.738,-0.699 -1.14,-1.174 -1.656,-1.954 -3.207,-5.256 -3.474,-12.86C35.437,10.232 30.19,5.5 24,5.5ZM24,42.5c-3.072,0 -5.473,-2.093 -5.924,-5h11.848c-0.45,2.907 -2.852,5 -5.924,5Z"
|
||||
android:fillColor="#9C7A2D"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M15.847,7.103a4.058,4.058 0,0 0,-6.1 -0.414l-0.871,0.87C6.09,10.347 4.7,14.355 5.978,18.083a38.396,38.396 0,0 0,9.208 14.732,38.395 38.395,0 0,0 14.732,9.208c3.728,1.277 7.736,-0.112 10.522,-2.898l0.871,-0.871a4.058,4.058 0,0 0,-0.414 -6.1l-5.706,-4.337a4.058,4.058 0,0 0,-5.325 0.361l-2.484,2.485c-0.793,0.792 -3.683,-0.814 -6.457,-3.587 -2.773,-2.774 -4.379,-5.664 -3.587,-6.457l2.485,-2.484a4.058,4.058 0,0 0,0.361 -5.325l-4.337,-5.706Z"
|
||||
android:fillColor="#DDE7FF"/>
|
||||
<path
|
||||
android:pathData="M20.083,17.848a4.058,4.058 0,0 0,0.101 -5.039l-4.337,-5.706a4.059,4.059 0,0 0,-5.839 -0.654c0.213,5.773 4.503,10.504 10.075,11.399ZM29.524,28.519 L29.866,28.177a4.058,4.058 0,0 1,5.325 -0.361l5.706,4.337a4.06,4.06 0,0 1,1.294 4.789c-0.392,0.038 -0.79,0.058 -1.19,0.058 -5.404,0 -9.973,-3.57 -11.477,-8.481Z"
|
||||
android:fillColor="#C3CFE9"/>
|
||||
<path
|
||||
android:pathData="M15.051,7.708a3.058,3.058 0,0 0,-4.597 -0.312l-0.871,0.87c-2.585,2.586 -3.784,6.209 -2.659,9.492a37.396,37.396 0,0 0,8.97 14.348,37.397 37.397,0 0,0 14.348,8.97c3.283,1.125 6.906,-0.074 9.491,-2.659l0.871,-0.871a3.058,3.058 0,0 0,-0.312 -4.597l-5.706,-4.337a3.058,3.058 0,0 0,-4.013 0.272l-2.484,2.485c-0.557,0.556 -1.32,0.54 -1.85,0.438 -0.572,-0.11 -1.2,-0.378 -1.828,-0.728 -1.27,-0.705 -2.76,-1.864 -4.193,-3.297 -1.433,-1.433 -2.592,-2.922 -3.297,-4.193 -0.35,-0.629 -0.617,-1.256 -0.728,-1.827 -0.103,-0.53 -0.119,-1.294 0.438,-1.85l2.485,-2.485a3.058,3.058 0,0 0,0.272 -4.013l-4.337,-5.706ZM9.04,5.982a5.058,5.058 0,0 1,7.603 0.516l4.337,5.706a5.058,5.058 0,0 1,-0.45 6.637l-2.394,2.394c0.002,0.033 0.008,0.08 0.02,0.146 0.055,0.28 0.213,0.697 0.513,1.237 0.592,1.066 1.623,2.41 2.963,3.75 1.34,1.34 2.684,2.37 3.75,2.963 0.54,0.3 0.957,0.458 1.237,0.513 0.065,0.012 0.113,0.018 0.146,0.02l2.394,-2.394a5.058,5.058 0,0 1,6.637 -0.45l5.706,4.337a5.058,5.058 0,0 1,0.516 7.603l-0.87,0.871c-2.988,2.988 -7.381,4.567 -11.554,3.137a39.395,39.395 0,0 1,-15.115 -9.447,39.395 39.395,0 0,1 -9.447,-15.115c-1.43,-4.173 0.15,-8.566 3.137,-11.553l0.87,-0.871 0.708,0.707 -0.707,-0.707ZM26.828,29.862 L26.817,29.864 26.827,29.862ZM18.138,21.172 L18.136,21.183c0,-0.008 0.002,-0.011 0.002,-0.01Z"
|
||||
android:fillColor="#6C7B9D"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
35
feature/registration/src/main/res/values/strings.xml
Normal file
35
feature/registration/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="RegistrationActivity_take_privacy_with_you_be_yourself_in_every_message">Take privacy with you.\nBe yourself in every message.</string>
|
||||
<!-- Non-English translations should use "Signal is a nonprofit" instead, dropping the 501c3 reference. -->
|
||||
<string name="RegistrationActivity_terms_and_privacy">Signal is a 501c3 nonprofit\nTerms & Privacy Policy</string>
|
||||
<string name="RegistrationActivity_continue">Continue</string>
|
||||
<!-- Screen title for restoring or transfering account -->
|
||||
<string name="registration_activity__restore_or_transfer">Restore or transfer</string>
|
||||
|
||||
<!-- GrantPermissionsFragment -->
|
||||
<!-- Displayed as a title at the top of the screen -->
|
||||
<string name="GrantPermissionsFragment__allow_permissions">Allow permissions</string>
|
||||
<!-- Displayed as a subtitle at the top of the screen -->
|
||||
<string name="GrantPermissionsFragment__to_help_you_message_people_you_know">To help you message people you know, Signal will request these permissions. </string>
|
||||
<!-- Displayed as a text-only action button at the bottom start of the screen -->
|
||||
<string name="GrantPermissionsFragment__not_now">Not now</string>
|
||||
<!-- Displayed as an action button at the bottom end of the screen -->
|
||||
<string name="GrantPermissionsFragment__next">Next</string>
|
||||
<!-- Notifications permission row title -->
|
||||
<string name="GrantPermissionsFragment__notifications">Notifications</string>
|
||||
<!-- Notifications permission row description -->
|
||||
<string name="GrantPermissionsFragment__get_notified_when">Get notified when new messages arrive.</string>
|
||||
<!-- Contacts permission row title -->
|
||||
<string name="GrantPermissionsFragment__contacts">Contacts</string>
|
||||
<!-- Contacts permission row description -->
|
||||
<string name="GrantPermissionsFragment__find_people_you_know">Find people you know. Your contacts are encrypted and not visible to the Signal service.</string>
|
||||
<!-- Phone calls permission row title -->
|
||||
<string name="GrantPermissionsFragment__phone_calls">Phone calls</string>
|
||||
<!-- Phone calls permission row description -->
|
||||
<string name="GrantPermissionsFragment__make_registering_easier">Make registering easier and enable additional calling features.</string>
|
||||
<!-- Storage permission row title -->
|
||||
<string name="GrantPermissionsFragment__storage">Storage</string>
|
||||
<!-- Storage permission row description -->
|
||||
<string name="GrantPermissionsFragment__send_photos_videos_and_files">Send photos, videos and files from your device.</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user