Updated on 2026-08-14
This commit is contained in:
parent
f0817c86ee
commit
03a9f13214
3 changed files with 13 additions and 14 deletions
|
|
@ -1,12 +1,11 @@
|
|||
package com.tangem.presentation.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.tangem.wallet.R;
|
||||
import com.tangem.presentation.fragment.VerifyCard;
|
||||
import com.tangem.wallet.R;
|
||||
|
||||
public class VerifyCardActivity extends AppCompatActivity {
|
||||
|
||||
|
|
@ -14,17 +13,16 @@ public class VerifyCardActivity extends AppCompatActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_verify_card);
|
||||
|
||||
MainActivity.commonInit(getApplicationContext());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
super.onBackPressed();
|
||||
VerifyCard verifyCard = (VerifyCard) getSupportFragmentManager().findFragmentById(R.id.verify_card_fragment);
|
||||
Intent data = verifyCard.prepareResultIntent();
|
||||
data.putExtra("modification", "update");
|
||||
setResult(Activity.RESULT_OK, data);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -615,7 +615,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
|
|||
ivTangemCard.setImageResource(mCard.getCardImageResource());
|
||||
|
||||
// Log.i(TAG, "sxnnnnnnnnnnn " + mCard.getBlockchainID());
|
||||
// Log.i(TAG, "sxnnnnnnnnnnn " + mCard.getTokenSymbol());
|
||||
Log.i(TAG, "sxnnnnnnnnnnn " + mCard.getTokenSymbol());
|
||||
// Log.i(TAG, "getDenomination " + Arrays.toString(mCard.getDenomination()));
|
||||
|
||||
final CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
|
||||
|
|
@ -714,7 +714,6 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
|
|||
|
||||
private void openVerifyCard(CardProtocol cardProtocol) {
|
||||
Intent intent = new Intent(getContext(), VerifyCardActivity.class);
|
||||
// // TODO обновить карту mCard
|
||||
intent.putExtra("UID", cardProtocol.getCard().getUID());
|
||||
intent.putExtra("Card", cardProtocol.getCard().getAsBundle());
|
||||
startActivityForResult(intent, REQUEST_CODE_VERIFY_CARD);
|
||||
|
|
@ -745,6 +744,14 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
|
|||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (requestCode) {
|
||||
case REQUEST_CODE_VERIFY_CARD:
|
||||
// action when erase wallet
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
if (getActivity() != null)
|
||||
getActivity().finish();
|
||||
}
|
||||
break;
|
||||
|
||||
case REQUEST_CODE_ENTER_NEW_PIN:
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
if (data != null) {
|
||||
|
|
|
|||
|
|
@ -127,16 +127,10 @@ public class VerifyCard extends Fragment implements NfcAdapter.ReaderCallback {
|
|||
btnOk.setOnClickListener(v1 -> {
|
||||
Intent data = prepareResultIntent();
|
||||
data.putExtra("modification", "update");
|
||||
Objects.requireNonNull(getActivity()).setResult(Activity.RESULT_OK, data);
|
||||
getActivity().finish();
|
||||
});
|
||||
|
||||
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
mSwipeRefreshLayout.setRefreshing(false);
|
||||
}
|
||||
});
|
||||
mSwipeRefreshLayout.setOnRefreshListener(() -> mSwipeRefreshLayout.setRefreshing(false));
|
||||
|
||||
fabMenu.setOnClickListener(v16 -> showMenu(fabMenu));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue