Revert "Use non-breaking spaces for backup code MaskedEditText"

This reverts commit 0feb4d074c.

Conflicts:
	OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java
This commit is contained in:
Dominik Schürmann
2016-03-08 15:01:49 +01:00
parent d6520cde04
commit 5379f64d08
3 changed files with 2 additions and 11 deletions

View File

@@ -170,11 +170,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar
mTitleAnimator.setDisplayedChild(1, animate);
mStatusAnimator.setDisplayedChild(1, animate);
mCodeFieldsAnimator.setDisplayedChild(1, animate);
// use non-breaking spaces to enlarge the empty EditText appropriately
String empty = "\u00a0\u00a0\u00a0\u00a0-\u00a0\u00a0\u00a0\u00a0" +
"-\u00a0\u00a0\u00a0\u00a0-\u00a0\u00a0\u00a0\u00a0" +
"-\u00a0\u00a0\u00a0\u00a0-\u00a0\u00a0\u00a0\u00a0";
mCodeEditText.setText(empty);
mCodeEditText.setText(" - - - - - ");
pushBackStackEntry();
@@ -354,8 +350,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar
String currentBackupCode = backupCode.getText().toString();
boolean inInputState = mCurrentState == BackupCodeState.STATE_INPUT
|| mCurrentState == BackupCodeState.STATE_INPUT_ERROR;
boolean partIsComplete = (currentBackupCode.indexOf(' ') == -1)
&& (currentBackupCode.indexOf('\u00a0') == -1);
boolean partIsComplete = (currentBackupCode.indexOf(' ') == -1);
if (!inInputState || !partIsComplete) {
return;
}

View File

@@ -84,11 +84,9 @@
android:textSize="18dp"
android:textStyle="bold"
android:typeface="monospace"
app:deleteChar="\u00a0"
app:mask="****-****-****-****-****-****"
app:maskIconColor="@color/colorPrimary"
app:notMaskedSymbol="*"
app:replacementChar="\u00a0"
tools:ignore="SpUsage" />
</org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>

View File

@@ -38,11 +38,9 @@
android:textSize="18dp"
android:textStyle="bold"
android:typeface="monospace"
app:deleteChar="\u00a0"
app:mask="****-****-****-****-****-****"
app:maskIconColor="@color/colorPrimary"
app:notMaskedSymbol="*"
app:replacementChar="\u00a0"
tools:ignore="SpUsage" />
</LinearLayout>