Hi everyone i cant add viewmodel class func execution to @ navigate up button on app bar plz tell how can i do that?
11/09/2019, 10:14 AM
IIRC you would need to override onOptionsItemSelected() in the view for that ID. Use that to find the right ID and call the View model function. By default if it calls super it will just default to jumping back to the parent activity declared in the manifest.
But if you're looking to override it, it's probably better to avoid that all together and use custom buttons on the toolbar.