Updated on 2026-08-14

This commit is contained in:
Tangem 2019-08-30 13:22:00 +03:00
commit af06bdca22
71 changed files with 1010 additions and 296 deletions

View file

@ -34,7 +34,7 @@ class LogoActivity : AppCompatActivity() {
App.navigatorComponent.inject(this)
ivLogo.setOnClickListener { hide() }
clLogoContainer.setOnClickListener { hide() }
}
override fun onPostCreate(savedInstanceState: Bundle?) {

View file

@ -41,14 +41,17 @@ class MainActivity : AppCompatActivity() {
// private var onNfcReaderCallback: NfcAdapter.ReaderCallback? = null
// override fun onNewIntent(intent: Intent?) {
// super.onNewIntent(intent)
// if (intent != null && (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action || NfcAdapter.ACTION_NDEF_DISCOVERED == intent.action)) {
// val tag = intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
// if (tag != null && onNfcReaderCallback != null)
// onNfcReaderCallback?.onTagDiscovered(tag)
// }
// }
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
if (intent != null && (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action || NfcAdapter.ACTION_NDEF_DISCOVERED == intent.action)) {
val tag = intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
if (tag != null) {
val activeFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment)
?.childFragmentManager?.primaryNavigationFragment
(activeFragment as? NfcAdapter.ReaderCallback)?.onTagDiscovered(tag)
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)