Updated on 2026-08-14
This commit is contained in:
parent
5113d0b230
commit
42bddc488d
4 changed files with 26 additions and 64 deletions
|
|
@ -68,12 +68,7 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
UsePIN2 = getIntent().getBooleanExtra("PIN2", false);
|
||||
|
||||
tvPIN = findViewById(R.id.pin);
|
||||
OnClickListener onButtonNClick = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tvPIN.setText(String.format("%s%s", tvPIN.getText(), ((Button) view).getText()));
|
||||
}
|
||||
};
|
||||
OnClickListener onButtonNClick = view -> tvPIN.setText(String.format("%s%s", tvPIN.getText(), ((Button) view).getText()));
|
||||
|
||||
if (UsePIN2) {
|
||||
((TextView) findViewById(R.id.pin_prompt)).setText(R.string.enter_pin2_and_use_fingerprint_to_save_it);
|
||||
|
|
@ -81,7 +76,7 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
((TextView) findViewById(R.id.pin_prompt)).setText(R.string.enter_pin_and_use_fingerprint_to_save_it);
|
||||
}
|
||||
|
||||
chkUseFingerprint = (CheckBox) findViewById(R.id.chkUseFingerprint);
|
||||
chkUseFingerprint = findViewById(R.id.chkUseFingerprint);
|
||||
|
||||
if (UsePIN2) {
|
||||
chkUseFingerprint.setChecked(true);
|
||||
|
|
@ -113,31 +108,19 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
Button btn9 = findViewById(R.id.btn9);
|
||||
btn9.setOnClickListener(onButtonNClick);
|
||||
Button btnBS = findViewById(R.id.btnBackspace);
|
||||
btnBS.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String S = tvPIN.getText().toString();
|
||||
if (S.length() > 0) {
|
||||
tvPIN.setText(S.substring(0, S.length() - 1));
|
||||
}
|
||||
|
||||
btnBS.setOnClickListener(view -> {
|
||||
String S = tvPIN.getText().toString();
|
||||
if (S.length() > 0) {
|
||||
tvPIN.setText(S.substring(0, S.length() - 1));
|
||||
}
|
||||
});
|
||||
|
||||
Button btnSave = findViewById(R.id.btnSavePIN);
|
||||
btnSave.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
doSavePIN();
|
||||
}
|
||||
});
|
||||
btnSave.setOnClickListener(view -> doSavePIN());
|
||||
|
||||
Button btnDelete = findViewById(R.id.btnDeletePIN);
|
||||
btnDelete.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
doDeletePIN();
|
||||
}
|
||||
});
|
||||
btnDelete.setOnClickListener(view -> doDeletePIN());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -191,12 +174,7 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
|
||||
if (UsePIN2) {
|
||||
if (!testFingerPrintSettings()) {
|
||||
tvPIN.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finish();
|
||||
}
|
||||
}, 2000);
|
||||
tvPIN.postDelayed(this::finish, 2000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -207,12 +185,7 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
} else {
|
||||
if (chkUseFingerprint.isChecked() || PINStorage.haveEncryptedPIN()) {
|
||||
if (!testFingerPrintSettings()) {
|
||||
tvPIN.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finish();
|
||||
}
|
||||
}, 2000);
|
||||
tvPIN.postDelayed(this::finish, 2000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,20 +178,16 @@
|
|||
|
||||
</GridLayout>
|
||||
|
||||
<Button
|
||||
<android.support.v7.widget.AppCompatButton
|
||||
android:id="@+id/btnContinue"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/colorPrimary"
|
||||
android:fontFamily="@font/raleway_r"
|
||||
android:text="@string/ok"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_large"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/ok"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -451,15 +451,8 @@
|
|||
android:id="@+id/btnLoad"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:fontFamily="@font/raleway_r"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/load"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
android:text="@string/load"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPurge"
|
||||
|
|
@ -476,18 +469,11 @@
|
|||
android:textSize="@dimen/text_size_medium"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatButton
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:id="@+id/btnExtract"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:fontFamily="@font/raleway_r"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/extract"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
android:text="@string/extract"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,13 @@
|
|||
|
||||
<style name="AppTheme.RoundedCornerMaterialButton" parent="Widget.AppCompat.Button.Colored">
|
||||
<item name="android:background">@drawable/rounded_shape</item>
|
||||
<item name="android:fontFamily">@font/raleway_r</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">@dimen/text_size_medium</item>
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:layout_height">36dp</item>
|
||||
<item name="android:layout_marginLeft">16dp</item>
|
||||
<item name="android:layout_marginRight">16dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue