mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Merge branch '2459-login-screen-redesign' into 'master'
Redesign login screen and setup wizard Closes #2459 See merge request briar/briar!1823
This commit is contained in:
@@ -109,12 +109,12 @@
|
||||
<activity
|
||||
android:name="org.briarproject.briar.android.login.StartupActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/app_name" />
|
||||
android:theme="@style/BriarTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name="org.briarproject.briar.android.account.SetupActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/setup_title" />
|
||||
android:theme="@style/BriarTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name="org.briarproject.briar.android.splash.SplashScreenActivity"
|
||||
|
||||
@@ -18,7 +18,9 @@ import javax.annotation.Nullable;
|
||||
|
||||
import static org.briarproject.bramble.api.identity.AuthorConstants.MAX_AUTHOR_NAME_LENGTH;
|
||||
import static org.briarproject.bramble.util.StringUtils.toUtf8;
|
||||
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
|
||||
import static org.briarproject.briar.android.util.UiUtils.setError;
|
||||
import static org.briarproject.briar.android.util.UiUtils.showOnboardingDialog;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
@@ -38,19 +40,27 @@ public class AuthorNameFragment extends SetupFragment {
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
requireActivity().setTitle(getString(R.string.setup_title));
|
||||
View v = inflater.inflate(R.layout.fragment_setup_author_name,
|
||||
container, false);
|
||||
authorNameWrapper = v.findViewById(R.id.nickname_entry_wrapper);
|
||||
authorNameInput = v.findViewById(R.id.nickname_entry);
|
||||
Button infoButton = v.findViewById(R.id.info_button);
|
||||
nextButton = v.findViewById(R.id.next);
|
||||
|
||||
authorNameInput.addTextChangedListener(this);
|
||||
infoButton.setOnClickListener(view ->
|
||||
showOnboardingDialog(requireContext(), getHelpText()));
|
||||
nextButton.setOnClickListener(this);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
hideViewOnSmallScreen(requireView().findViewById(R.id.logo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
|
||||
@@ -23,6 +23,7 @@ import static android.view.View.VISIBLE;
|
||||
import static android.widget.Toast.LENGTH_LONG;
|
||||
import static org.briarproject.android.dontkillmelib.DozeUtils.getDozeWhitelistingIntent;
|
||||
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_DOZE_WHITELISTING;
|
||||
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
|
||||
import static org.briarproject.briar.android.util.UiUtils.showOnboardingDialog;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@@ -79,6 +80,12 @@ public class DozeFragment extends SetupFragment
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
hideViewOnSmallScreen(requireView().findViewById(R.id.logo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
|
||||
@@ -28,10 +28,12 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static android.os.Build.VERSION.SDK_INT;
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
|
||||
import static androidx.core.content.ContextCompat.checkSelfPermission;
|
||||
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.QUITE_WEAK;
|
||||
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.STRONG;
|
||||
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
|
||||
import static org.briarproject.briar.android.util.UiUtils.setError;
|
||||
import static org.briarproject.briar.android.util.UiUtils.showOnboardingDialog;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
@@ -57,7 +59,6 @@ public class SetPasswordFragment extends SetupFragment {
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
requireActivity().setTitle(getString(R.string.setup_password_intro));
|
||||
View v = inflater.inflate(R.layout.fragment_setup_password, container,
|
||||
false);
|
||||
|
||||
@@ -67,17 +68,18 @@ public class SetPasswordFragment extends SetupFragment {
|
||||
passwordConfirmationWrapper =
|
||||
v.findViewById(R.id.password_confirm_wrapper);
|
||||
passwordConfirmation = v.findViewById(R.id.password_confirm);
|
||||
Button infoButton = v.findViewById(R.id.info_button);
|
||||
nextButton = v.findViewById(R.id.next);
|
||||
ProgressBar progressBar = v.findViewById(R.id.progress);
|
||||
|
||||
passwordEntry.addTextChangedListener(this);
|
||||
passwordConfirmation.addTextChangedListener(this);
|
||||
infoButton.setOnClickListener(view ->
|
||||
showOnboardingDialog(requireContext(), getHelpText()));
|
||||
nextButton.setOnClickListener(this);
|
||||
|
||||
if (!viewModel.needToShowDozeFragment()) {
|
||||
nextButton.setText(R.string.create_account_button);
|
||||
int options = passwordConfirmation.getImeOptions();
|
||||
passwordConfirmation.setImeOptions(options | IME_ACTION_DONE);
|
||||
}
|
||||
|
||||
viewModel.getIsCreatingAccount()
|
||||
@@ -94,6 +96,12 @@ public class SetPasswordFragment extends SetupFragment {
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
hideViewOnSmallScreen(requireView().findViewById(R.id.logo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
@@ -110,17 +118,27 @@ public class SetPasswordFragment extends SetupFragment {
|
||||
String password2 = passwordConfirmation.getText().toString();
|
||||
boolean passwordsMatch = password1.equals(password2);
|
||||
|
||||
strengthMeter
|
||||
.setVisibility(password1.length() > 0 ? VISIBLE : INVISIBLE);
|
||||
strengthMeter.setVisibility(!password1.isEmpty() ? VISIBLE : INVISIBLE);
|
||||
float strength = viewModel.estimatePasswordStrength(password1);
|
||||
strengthMeter.setStrength(strength);
|
||||
boolean strongEnough = strength >= QUITE_WEAK;
|
||||
|
||||
if (!password1.isEmpty()) {
|
||||
if (strength >= STRONG) {
|
||||
passwordEntryWrapper.setHelperText(
|
||||
getString(R.string.password_strong));
|
||||
} else if (strength >= QUITE_WEAK) {
|
||||
passwordEntryWrapper.setHelperText(
|
||||
getString(R.string.password_quite_strong));
|
||||
} else {
|
||||
passwordEntryWrapper.setHelperTextEnabled(false);
|
||||
}
|
||||
}
|
||||
setError(passwordEntryWrapper, getString(R.string.password_too_weak),
|
||||
password1.length() > 0 && !strongEnough);
|
||||
!password1.isEmpty() && !strongEnough);
|
||||
setError(passwordConfirmationWrapper,
|
||||
getString(R.string.passwords_do_not_match),
|
||||
password2.length() > 0 && !passwordsMatch);
|
||||
!password2.isEmpty() && !passwordsMatch);
|
||||
|
||||
boolean enabled = passwordsMatch && strongEnough;
|
||||
nextButton.setEnabled(enabled);
|
||||
|
||||
@@ -40,6 +40,7 @@ import static org.briarproject.bramble.api.crypto.DecryptionResult.SUCCESS;
|
||||
import static org.briarproject.briar.android.login.LoginUtils.createKeyStrengthenerErrorDialog;
|
||||
import static org.briarproject.briar.android.util.UiUtils.enterPressed;
|
||||
import static org.briarproject.briar.android.util.UiUtils.hideSoftKeyboard;
|
||||
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
|
||||
import static org.briarproject.briar.android.util.UiUtils.setError;
|
||||
import static org.briarproject.briar.android.util.UiUtils.showSoftKeyboard;
|
||||
|
||||
@@ -100,6 +101,12 @@ public class PasswordFragment extends BaseFragment implements TextWatcher {
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
hideViewOnSmallScreen(requireView().findViewById(R.id.logo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count,
|
||||
int after) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
tools:context=".android.login.PasswordFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -11,15 +12,43 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_activity_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/hero_square"
|
||||
android:layout_margin="16dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/splash_screen"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sign_in_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sign_in_title"
|
||||
style="@style/TextAppearance.AppCompat.Large"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/sign_in_title"
|
||||
app:layout_constraintBottom_toTopOf="@+id/password_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/logo" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/password_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:hintEnabled="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/btn_forgotten"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sign_in_title"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@@ -35,16 +64,30 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_forgotten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/forgotten_password"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintBottom_toTopOf="@+id/btn_sign_in"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password_layout" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sign_in"
|
||||
style="@style/BriarButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:text="@string/sign_in_button"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/password_layout" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_wheel"
|
||||
@@ -56,19 +99,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btn_sign_in" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_forgotten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_large"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="@string/forgotten_password"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_sign_in" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -16,16 +16,44 @@
|
||||
android:paddingRight="@dimen/margin_activity_horizontal"
|
||||
android:paddingBottom="@dimen/margin_activity_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/hero_square"
|
||||
android:layout_margin="16dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/splash_screen"
|
||||
app:layout_constraintBottom_toTopOf="@+id/intro"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/intro"
|
||||
style="@style/TextAppearance.AppCompat.Large"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_title"
|
||||
app:layout_constraintBottom_toTopOf="@+id/nickname_entry_wrapper"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/logo" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/nickname_entry_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:hintEnabled="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/info_button"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toBottomOf="@+id/intro">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/nickname_entry"
|
||||
@@ -40,19 +68,29 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/info_button"
|
||||
style="@style/BriarButtonFlat.Positive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_info_white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/more_info"
|
||||
app:drawableTint="@color/briar_button_text_positive"
|
||||
app:layout_constraintBottom_toTopOf="@+id/next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nickname_entry_wrapper" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
style="@style/BriarButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_activity_horizontal"
|
||||
android:enabled="false"
|
||||
android:text="@string/setup_next"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nickname_entry_wrapper"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
tools:enabled="true" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -11,20 +11,36 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_activity_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/hero_square"
|
||||
android:layout_marginBottom="@dimen/margin_xlarge"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/splash_screen"
|
||||
app:layout_constraintBottom_toTopOf="@+id/dozeView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<org.briarproject.briar.android.account.DozeView
|
||||
android:id="@+id/dozeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/huaweiProtectedAppsView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/logo" />
|
||||
|
||||
<org.briarproject.briar.android.account.HuaweiProtectedAppsView
|
||||
android:id="@+id/huaweiProtectedAppsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/huaweiAppLaunchView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dozeView" />
|
||||
@@ -34,6 +50,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/xiaomiRecentAppsView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/huaweiProtectedAppsView" />
|
||||
@@ -43,6 +60,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/xiaomiLockAppsView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/huaweiAppLaunchView" />
|
||||
@@ -52,6 +70,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/xiaomiRecentAppsView" />
|
||||
@@ -66,8 +85,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/xiaomiLockAppsView"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
tools:enabled="true" />
|
||||
|
||||
<ProgressBar
|
||||
|
||||
@@ -16,6 +16,33 @@
|
||||
android:paddingRight="@dimen/margin_activity_horizontal"
|
||||
android:paddingBottom="@dimen/margin_activity_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/hero_square"
|
||||
android:layout_margin="16dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/splash_screen"
|
||||
app:layout_constraintBottom_toTopOf="@+id/intro"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/intro"
|
||||
style="@style/TextAppearance.AppCompat.Large"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_password_intro"
|
||||
app:layout_constraintBottom_toTopOf="@+id/password_entry_wrapper"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/logo" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/password_entry_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
@@ -23,9 +50,10 @@
|
||||
android:layout_marginTop="8dp"
|
||||
app:errorEnabled="true"
|
||||
app:hintEnabled="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/strength_meter"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/intro"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@@ -46,9 +74,10 @@
|
||||
<org.briarproject.briar.android.login.StrengthMeter
|
||||
android:id="@+id/strength_meter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@+id/password_confirm_wrapper"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password_entry_wrapper"
|
||||
@@ -61,6 +90,7 @@
|
||||
android:layout_marginTop="8dp"
|
||||
app:errorEnabled="true"
|
||||
app:hintEnabled="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/info_button"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/strength_meter"
|
||||
@@ -76,6 +106,19 @@
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/info_button"
|
||||
style="@style/BriarButtonFlat.Positive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_info_white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/more_info"
|
||||
app:drawableTint="@color/briar_button_text_positive"
|
||||
app:layout_constraintBottom_toTopOf="@+id/next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password_confirm_wrapper" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
style="@style/BriarButton"
|
||||
@@ -86,8 +129,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password_confirm_wrapper"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
tools:enabled="true" />
|
||||
|
||||
<ProgressBar
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
<string name="confirm_password">Confirm your password</string>
|
||||
<string name="name_too_long">Name is too long</string>
|
||||
<string name="password_too_weak">Password is too weak</string>
|
||||
<string name="password_quite_strong">Password is okay</string>
|
||||
<string name="password_strong">Password is strong</string>
|
||||
<string name="passwords_do_not_match">Passwords do not match</string>
|
||||
<string name="create_account_button">Create Account</string>
|
||||
<string name="more_info">More Information</string>
|
||||
@@ -41,8 +43,9 @@
|
||||
<string name="try_again">Wrong password, try again</string>
|
||||
<string name="dialog_title_cannot_check_password">Cannot Check Password</string>
|
||||
<string name="dialog_message_cannot_check_password">Briar cannot check your password. Please try rebooting your device to solve this problem.</string>
|
||||
<string name="sign_in_title">Sign into Briar</string>
|
||||
<string name="sign_in_button">Sign In</string>
|
||||
<string name="forgotten_password">I have forgotten my password</string>
|
||||
<string name="forgotten_password">Forgot your password?</string>
|
||||
<string name="dialog_title_lost_password">Lost Password</string>
|
||||
<string name="dialog_message_lost_password">Your Briar account is stored encrypted on your device, not in the cloud, so we can\'t reset your password. Would you like to delete your account and start again?\n\nCaution: Your identities, contacts and messages will be permanently lost.</string>
|
||||
<string name="startup_failed_activity_title">Briar Startup Failure</string>
|
||||
|
||||
Reference in New Issue
Block a user