Android Tutorial #48 Detect Back Button , onBackPressed() verify by making a log entry using log.d()

Опубликовано: 29 Сентябрь 2024
на канале: clientuser.net
7,781
21

Source Code:   / clientuser_net  

While still on the topic of sanity checking, I also peppered my code with log.d() statements to trace through the activity life cycle of my activity classes.
e.g.
Log.d("AnimationActivity002", "A ClientUser.net Tutorial - Back Button Pressed");

I also take this opportunity to introduce overriding / detecting the back button key press onBackPressed() on android. I place a log in the overridden method to verify that we do press the back button.

I thinks thats it for sanity checking, we are free to move on and explore the game loop tutorial.