mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:53:40 +00:00
parent
1a24885110
commit
b39820dcb6
@ -18,6 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/registration_lock_reminder_view__enter_your_registration_lock_pin"/>
|
android:text="@string/registration_lock_reminder_view__enter_your_registration_lock_pin"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -47,6 +48,6 @@
|
|||||||
android:paddingRight="20dp"
|
android:paddingRight="20dp"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:lineSpacingMultiplier="1.3"
|
android:lineSpacingMultiplier="1.3"
|
||||||
tools:text="Registration Lock is enabled for your phone number. I forgot my PIN."/>
|
tools:text="Reminder: Registration Lock is enabled for your phone number. To help you memorize your Registration Lock PIN, Signal will periodically ask you to confirm it. I forgot my PIN."/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -1386,7 +1386,7 @@
|
|||||||
<string name="RegistrationActivity_registration_of_this_phone_number_will_be_possible_without_your_registration_lock_pin_after_seven_days_have_passed">Registration of this phone number will be possible without your Registration Lock PIN after 7 days have passed since this phone number was last active on Signal. You have %d days remaining.</string>
|
<string name="RegistrationActivity_registration_of_this_phone_number_will_be_possible_without_your_registration_lock_pin_after_seven_days_have_passed">Registration of this phone number will be possible without your Registration Lock PIN after 7 days have passed since this phone number was last active on Signal. You have %d days remaining.</string>
|
||||||
<string name="RegistrationActivity_registration_lock_pin">Registration lock PIN</string>
|
<string name="RegistrationActivity_registration_lock_pin">Registration lock PIN</string>
|
||||||
<string name="RegistrationActivity_this_phone_number_has_registration_lock_enabled_please_enter_the_registration_lock_pin">This phone number has Registration Lock enabled. Please enter the Registration Lock PIN.</string>
|
<string name="RegistrationActivity_this_phone_number_has_registration_lock_enabled_please_enter_the_registration_lock_pin">This phone number has Registration Lock enabled. Please enter the Registration Lock PIN.</string>
|
||||||
<string name="RegistrationLockDialog_registration_lock_is_enabled_for_your_phone_number">Registration Lock is enabled for your phone number.</string>
|
<string name="RegistrationLockDialog_registration_lock_is_enabled_for_your_phone_number">Registration Lock is enabled for your phone number. To help you memorize your Registration Lock PIN, Signal will periodically ask you to confirm it.</string>
|
||||||
<string name="RegistrationLockDialog_i_forgot_my_pin">I forgot my PIN.</string>
|
<string name="RegistrationLockDialog_i_forgot_my_pin">I forgot my PIN.</string>
|
||||||
<string name="RegistrationLockDialog_forgotten_pin">Forgotten PIN?</string>
|
<string name="RegistrationLockDialog_forgotten_pin">Forgotten PIN?</string>
|
||||||
<string name="RegistrationLockDialog_registration_lock_helps_protect_your_phone_number_from_unauthorized_registration_attempts">Registration Lock helps protect your phone number from unauthorized registration attempts. This feature can be disabled at any time in your Signal privacy settings</string>
|
<string name="RegistrationLockDialog_registration_lock_helps_protect_your_phone_number_from_unauthorized_registration_attempts">Registration Lock helps protect your phone number from unauthorized registration attempts. This feature can be disabled at any time in your Signal privacy settings</string>
|
||||||
@ -1401,6 +1401,7 @@
|
|||||||
<string name="preferences_chats__backups">Backups</string>
|
<string name="preferences_chats__backups">Backups</string>
|
||||||
<string name="prompt_passphrase_activity__signal_is_locked">Signal is locked</string>
|
<string name="prompt_passphrase_activity__signal_is_locked">Signal is locked</string>
|
||||||
<string name="prompt_passphrase_activity__tap_to_unlock">TAP TO UNLOCK</string>
|
<string name="prompt_passphrase_activity__tap_to_unlock">TAP TO UNLOCK</string>
|
||||||
|
<string name="RegistrationLockDialog_reminder">Reminder:</string>
|
||||||
<!-- EOF -->
|
<!-- EOF -->
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -5,6 +5,7 @@ import android.annotation.SuppressLint;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
@ -15,6 +16,7 @@ import android.text.Spanned;
|
|||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.text.style.ClickableSpan;
|
import android.text.style.ClickableSpan;
|
||||||
|
import android.text.style.StyleSpan;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
@ -55,8 +57,8 @@ public class RegistrationLockDialog {
|
|||||||
display.getMetrics(metrics);
|
display.getMetrics(metrics);
|
||||||
|
|
||||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||||
dialog.getWindow().setLayout((int)(metrics.widthPixels * .75), ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
dialog.getWindow().setLayout((int)(metrics.widthPixels * .80), ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
|
|
||||||
EditText pinEditText = dialog.findViewById(R.id.pin);
|
EditText pinEditText = dialog.findViewById(R.id.pin);
|
||||||
TextView reminder = dialog.findViewById(R.id.reminder);
|
TextView reminder = dialog.findViewById(R.id.reminder);
|
||||||
@ -64,6 +66,7 @@ public class RegistrationLockDialog {
|
|||||||
assert pinEditText != null;
|
assert pinEditText != null;
|
||||||
assert reminder != null;
|
assert reminder != null;
|
||||||
|
|
||||||
|
SpannableString reminderIntro = new SpannableString(context.getString(R.string.RegistrationLockDialog_reminder));
|
||||||
SpannableString reminderText = new SpannableString(context.getString(R.string.RegistrationLockDialog_registration_lock_is_enabled_for_your_phone_number));
|
SpannableString reminderText = new SpannableString(context.getString(R.string.RegistrationLockDialog_registration_lock_is_enabled_for_your_phone_number));
|
||||||
SpannableString forgotText = new SpannableString(context.getString(R.string.RegistrationLockDialog_i_forgot_my_pin));
|
SpannableString forgotText = new SpannableString(context.getString(R.string.RegistrationLockDialog_i_forgot_my_pin));
|
||||||
|
|
||||||
@ -79,9 +82,11 @@ public class RegistrationLockDialog {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
reminderIntro.setSpan(new StyleSpan(Typeface.BOLD), 0, reminderIntro.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
forgotText.setSpan(clickableSpan, 0, forgotText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
forgotText.setSpan(clickableSpan, 0, forgotText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
reminder.setText(new SpannableStringBuilder(reminderText).append(" ").append(forgotText));
|
reminder.setText(new SpannableStringBuilder(reminderIntro).append(" ").append(reminderText).append(" ").append(forgotText));
|
||||||
reminder.setMovementMethod(LinkMovementMethod.getInstance());
|
reminder.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
|
|
||||||
pinEditText.addTextChangedListener(new TextWatcher() {
|
pinEditText.addTextChangedListener(new TextWatcher() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user