Switching Screen by HW button?
- HI All,
I'm having an issue regarding switching screen.
in My GUI, i have Screen one and Screen two,
1- in screen one i set an interaction for changing the current screen (to screen two) by hardware button and i generated the code correctly and i found the next API
//Handles when a key is pressed
void Screen1ViewBase::handleKeyEvent(uint8_t key)
{
if(0 == key)
{
application().gotoScreen2CoverTransitionEast();
}
}
2- i used this handleKeyEvent(0) (in certain event) , in the screen1 view, but i didn't succeed to switch the screen2.
3- after debugging , i found that i actually go to the screen two setupScreen, the screen doesn't appear on the lcd.
Q: i want how ask how to use handleKeyEvent() properly ? do i use it in the screen view or the presenter or the model?
