Updated on 2026-08-14
This commit is contained in:
parent
62fa6fa689
commit
76b6259bfc
7 changed files with 150 additions and 331 deletions
|
|
@ -48,7 +48,6 @@ public class ConfirmWithFingerprintTask extends AsyncTask<Void, Void, Boolean> {
|
|||
} else {
|
||||
savePINActivity.print("Confirm PIN action using fingerprint!");
|
||||
savePINActivity.fingerprintHelper.startAuth(savePINActivity.fingerprintManager, savePINActivity.cryptoObject);
|
||||
savePINActivity.CreateFingerPrintConfirmationDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +55,6 @@ public class ConfirmWithFingerprintTask extends AsyncTask<Void, Void, Boolean> {
|
|||
protected void onCancelled() {
|
||||
SavePINActivity savePINActivity = reference.get();
|
||||
|
||||
savePINActivity.mConfirmWithFingerprintTask = null;
|
||||
if (savePINActivity.dFingerPrintConfirmation != null) {
|
||||
savePINActivity.dFingerPrintConfirmation.cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import com.tangem.domain.wallet.PINStorage
|
|||
import com.tangem.domain.wallet.TangemCard
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.activity_request_pin.*
|
||||
import kotlinx.android.synthetic.main.layout_pin_buttons.*
|
||||
import java.io.IOException
|
||||
|
||||
class RequestPINActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, FingerprintHelper.FingerprintHelperListener {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
private TextView tvPIN;
|
||||
private CheckBox chkUseFingerprint;
|
||||
|
||||
public ConfirmWithFingerprintTask mConfirmWithFingerprintTask;
|
||||
public ConfirmWithFingerprintTask confirmWithFingerprintTask;
|
||||
|
||||
private KeyStore keyStore;
|
||||
private Cipher cipher;
|
||||
|
|
@ -70,11 +70,10 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
tvPIN = findViewById(R.id.pin);
|
||||
OnClickListener onButtonNClick = view -> tvPIN.setText(String.format("%s%s", tvPIN.getText(), ((Button) view).getText()));
|
||||
|
||||
if (UsePIN2) {
|
||||
if (UsePIN2)
|
||||
((TextView) findViewById(R.id.pin_prompt)).setText(R.string.enter_pin2_and_use_fingerprint_to_save_it);
|
||||
} else {
|
||||
else
|
||||
((TextView) findViewById(R.id.pin_prompt)).setText(R.string.enter_pin_and_use_fingerprint_to_save_it);
|
||||
}
|
||||
|
||||
chkUseFingerprint = findViewById(R.id.chkUseFingerprint);
|
||||
|
||||
|
|
@ -86,7 +85,6 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
chkUseFingerprint.setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
Button btn0 = findViewById(R.id.btn0);
|
||||
btn0.setOnClickListener(onButtonNClick);
|
||||
Button btn1 = findViewById(R.id.btn1);
|
||||
|
|
@ -121,7 +119,6 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
|
||||
Button btnDelete = findViewById(R.id.btnDeletePIN);
|
||||
btnDelete.setOnClickListener(view -> doDeletePIN());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -131,8 +128,8 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
if (fingerprintHelper != null)
|
||||
fingerprintHelper.cancel();
|
||||
|
||||
if (mConfirmWithFingerprintTask != null)
|
||||
mConfirmWithFingerprintTask.cancel(true);
|
||||
if (confirmWithFingerprintTask != null)
|
||||
confirmWithFingerprintTask.cancel(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -141,12 +138,12 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
if (fingerprintHelper != null)
|
||||
fingerprintHelper.cancel();
|
||||
|
||||
if (mConfirmWithFingerprintTask != null)
|
||||
mConfirmWithFingerprintTask.cancel(true);
|
||||
if (confirmWithFingerprintTask != null)
|
||||
confirmWithFingerprintTask.cancel(true);
|
||||
}
|
||||
|
||||
private void doSavePIN() {
|
||||
if (mConfirmWithFingerprintTask != null) {
|
||||
if (confirmWithFingerprintTask != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -175,8 +172,8 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
|
||||
onConfirmAction = OnConfirmAction.Save;
|
||||
|
||||
mConfirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
mConfirmWithFingerprintTask.execute((Void) null);
|
||||
confirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
confirmWithFingerprintTask.execute((Void) null);
|
||||
} else {
|
||||
if (chkUseFingerprint.isChecked() || PINStorage.haveEncryptedPIN()) {
|
||||
if (!testFingerPrintSettings()) {
|
||||
|
|
@ -190,11 +187,10 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
onConfirmAction = OnConfirmAction.DeleteEncryptedAndSave;
|
||||
}
|
||||
|
||||
// Show a progress spinner, and kick off a background task to
|
||||
// perform the user login attempt.
|
||||
// show a progress spinner, and kick off a background task to perform the user login attempt
|
||||
//showProgress(true);
|
||||
mConfirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
mConfirmWithFingerprintTask.execute((Void) null);
|
||||
confirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
confirmWithFingerprintTask.execute((Void) null);
|
||||
} else {
|
||||
PINStorage.savePIN(tvPIN.getText().toString());
|
||||
finish();
|
||||
|
|
@ -211,8 +207,8 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
return;
|
||||
}
|
||||
onConfirmAction = OnConfirmAction.Delete;
|
||||
mConfirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
mConfirmWithFingerprintTask.execute((Void) null);
|
||||
confirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
confirmWithFingerprintTask.execute((Void) null);
|
||||
} else {
|
||||
tvPIN.setText("");
|
||||
finish();
|
||||
|
|
@ -224,8 +220,8 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
return;
|
||||
}
|
||||
onConfirmAction = OnConfirmAction.Delete;
|
||||
mConfirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
mConfirmWithFingerprintTask.execute((Void) null);
|
||||
confirmWithFingerprintTask = new ConfirmWithFingerprintTask(SavePINActivity.this);
|
||||
confirmWithFingerprintTask.execute((Void) null);
|
||||
} else {
|
||||
tvPIN.setText("");
|
||||
PINStorage.deletePIN();
|
||||
|
|
@ -416,43 +412,4 @@ public class SavePINActivity extends AppCompatActivity implements FingerprintHel
|
|||
|
||||
public Dialog dFingerPrintConfirmation = null;
|
||||
|
||||
public void CreateFingerPrintConfirmationDialog() {
|
||||
// final AlertDialogWrapper.Builder b = new AlertDialogWrapper.Builder(this);
|
||||
// switch (onConfirmAction)
|
||||
// {
|
||||
// case Save:
|
||||
// if( UsePIN2) {
|
||||
// b.setTitle("Confirm new PIN2 saving ");
|
||||
// }else{
|
||||
// b.setTitle("Confirm new PIN saving ");
|
||||
// }
|
||||
// break;
|
||||
// case Delete:
|
||||
// if( UsePIN2 ) {
|
||||
// b.setTitle("Confirm PIN2 deleting");
|
||||
// }else{
|
||||
// b.setTitle("Confirm PIN deleting");
|
||||
// }
|
||||
// break;
|
||||
// case DeleteEncryptedAndSave:
|
||||
// if( UsePIN2 ) {
|
||||
// b.setTitle("Confirm deleting old saved PIN2");
|
||||
// }else {
|
||||
// b.setTitle("Confirm deleting old saved PIN");
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// View view = getLayoutInflater().inflate(R.layout.dialog_fingerprint_confirmation, null);
|
||||
// b.setView(view);
|
||||
|
||||
// dFingerPrintConfirmation = b.show();
|
||||
// dFingerPrintConfirmation.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
// @Override
|
||||
// public void onCancel(DialogInterface dialog) {
|
||||
// fingerprintHelper.cancel();
|
||||
// print("Cancel fingerprint confirmation");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,8 +4,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.tangem.presentation.activity.RequestPINActivity"
|
||||
tools:ignore="contentDescription">
|
||||
tools:context="com.tangem.presentation.activity.RequestPINActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPin"
|
||||
|
|
@ -18,7 +17,7 @@
|
|||
android:textAlignment="center"
|
||||
android:textSize="36sp"
|
||||
tools:ignore="TextViewEdits"
|
||||
tools:text="12345" />
|
||||
tools:text="1234" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -44,78 +43,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/gridLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:columnCount="3"
|
||||
android:rowCount="4">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn1"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn2"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn3"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_3" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn4"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn5"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn6"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_6" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn7"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_7" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn8"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_8" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn9"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_9" />
|
||||
|
||||
<Space />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn0"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnBackspace"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/pin_back"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_size_pin" />
|
||||
|
||||
</GridLayout>
|
||||
<include layout="@layout/layout_pin_buttons" />
|
||||
|
||||
<android.support.v7.widget.AppCompatButton
|
||||
android:id="@+id/btnContinue"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -7,207 +6,80 @@
|
|||
android:orientation="vertical"
|
||||
tools:context="com.tangem.presentation.activity.SavePINActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/login_form"
|
||||
<TextView
|
||||
android:id="@+id/pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberPassword"
|
||||
android:paddingBottom="8dp"
|
||||
android:singleLine="false"
|
||||
android:textAlignment="center"
|
||||
android:textSize="36sp"
|
||||
tools:ignore="TextViewEdits" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pin"
|
||||
<TextView
|
||||
android:id="@+id/pin_prompt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/maax"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/enter_pin_and_use_fingerprint_to_save_it"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/layout_pin_buttons" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberPassword"
|
||||
android:paddingBottom="8dp"
|
||||
android:singleLine="false"
|
||||
android:textAlignment="center"
|
||||
android:textSize="36sp"
|
||||
tools:ignore="TextViewEdits"/>
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pin_prompt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/maax"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/enter_pin_and_use_fingerprint_to_save_it"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<GridLayout
|
||||
<CheckBox
|
||||
android:id="@+id/chkUseFingerprint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:columnCount="3"
|
||||
android:rowCount="4">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn1"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="1"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn2"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="2"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn3"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="3"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn4"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="4"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn5"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="5"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn6"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="6"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn7"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="7"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn8"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="8"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn9"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="9"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Space/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn0"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="0"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnBackspace"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:layout_width="@dimen/pin_button_size"
|
||||
android:layout_height="@dimen/pin_button_size"
|
||||
android:layout_marginTop="@dimen/pin_button_top_margin"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="<"
|
||||
android:textSize="32dp"/>
|
||||
|
||||
</GridLayout>
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:drawableEnd="@mipmap/ic_fp"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/protect_with_fingerprint" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkUseFingerprint"
|
||||
<Button
|
||||
android:id="@+id/btnSavePIN"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:drawableEnd="@mipmap/ic_fp"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/protect_with_fingerprint"/>
|
||||
android:layout_weight="1"
|
||||
android:text="@string/save"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSavePIN"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/save"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDeletePIN"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/delete"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/btnDeletePIN"
|
||||
style="@style/AppTheme.RoundedCornerMaterialButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/delete"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -12,7 +10,7 @@
|
|||
android:layout_height="96dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:src="@mipmap/ic_fp"/>
|
||||
android:src="@mipmap/ic_fp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -21,7 +19,7 @@
|
|||
android:layout_margin="16dp"
|
||||
android:text="@string/touch_fingerprint_scanner_to_confirm"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/text_size_medium"/>
|
||||
android:textSize="@dimen/text_size_medium" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/login_progress"
|
||||
|
|
@ -29,6 +27,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
65
app/src/main/res/layout/layout_pin_buttons.xml
Normal file
65
app/src/main/res/layout/layout_pin_buttons.xml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:columnCount="3"
|
||||
android:rowCount="4">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn1"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn2"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn3"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_3" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn4"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn5"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn6"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_6" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn7"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_7" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn8"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_8" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn9"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_9" />
|
||||
|
||||
<Space />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn0"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/_0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnBackspace"
|
||||
style="@style/ButtonPin"
|
||||
android:text="@string/pin_back" />
|
||||
|
||||
</GridLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue