Updated on 2026-08-14

This commit is contained in:
Tangem 2018-07-30 23:35:58 +03:00
parent bd03f61333
commit 26be445734
15 changed files with 59 additions and 106 deletions

View file

@ -1,6 +1,5 @@
package com.tangem.presentation.activity
import android.app.Activity
import android.nfc.NfcAdapter
import android.nfc.Tag
import android.os.Bundle
@ -29,12 +28,12 @@ class LoadedWalletActivity : AppCompatActivity() {
}
}
override fun onBackPressed() {
val loadedWallet = supportFragmentManager.findFragmentById(R.id.loaded_wallet_fragment) as LoadedWallet
val data = loadedWallet.prepareResultIntent()
data.putExtra(EXTRA_MODIFICATION, "update")
setResult(Activity.RESULT_OK, data)
finish()
}
// override fun onBackPressed() {
// val loadedWallet = supportFragmentManager.findFragmentById(R.id.loaded_wallet_fragment) as LoadedWallet
// val data = loadedWallet.prepareResultIntent()
// data.putExtra(EXTRA_MODIFICATION, "update")
// setResult(Activity.RESULT_OK, data)
// finish()
// }
}

View file

@ -83,6 +83,8 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
mNfcManager = NfcManager(this, this)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR

View file

@ -2,6 +2,7 @@ package com.tangem.presentation.activity;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.nfc.NfcAdapter;
@ -39,6 +40,8 @@ public class PurgeActivity extends AppCompatActivity implements NfcAdapter.Reade
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_purge);
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
mNfcManager = new NfcManager(this, this);
MainActivity.Companion.commonInit(getApplicationContext());

View file

@ -13,7 +13,6 @@ class VerifyCardActivity : AppCompatActivity() {
MainActivity.commonInit(applicationContext)
}
override fun onBackPressed() {
super.onBackPressed()
val verifyCard = supportFragmentManager.findFragmentById(R.id.verify_card_fragment) as VerifyCard