added a Mensa shortcut

* added a Mensa shortcut, to directly display the Mensa-Screen
* kotlin 1.3.60 -> 1.3.61
This commit is contained in:
2019-11-28 16:38:25 +01:00
parent d4860b2a32
commit 9907d083e9
6 changed files with 35 additions and 1 deletions

View File

@ -85,9 +85,17 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
nav_view.setNavigationItemSelectedListener(this)
// TODO use a switch expression
// if we get an NFC read intent while the app is closed call readBalance
if (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action)
NFCMensaCard.readBalance(intent, this)
if ("org.mosad.seil0.projectlaogai.fragments.MensaFragment" == intent.action) {
println("starting mensa screen")
// TODO find a way to use only one FragmentTransaction
val fragmentTransaction2: FragmentTransaction = supportFragmentManager.beginTransaction()
fragmentTransaction2.replace(R.id.fragment_container, MensaFragment())
fragmentTransaction2.commit()
}
}
override fun onNewIntent(intent: Intent) {