konmik / nucleus

Nucleus is an Android library, which utilizes the Model-View-Presenter pattern to properly connect background tasks with visual parts of an application.
MIT License
1.97k stars 253 forks source link

restartableLatestCache callback to show Popupwindow #129

Closed ml-bright closed 7 years ago

ml-bright commented 7 years ago

Thank you for you library!

When I requestData with method restartableLatestCache and it callback to show a popupwindow success. but when I rotating screen and then restartableLatestCache callback to show popupwindow , this take exception :
unable to add window -- token null is not valid; is your activity running

it seem that restartableLatestCache callback before onWindowFocusChanged() .

How can i solve this problem

konmik commented 7 years ago

Hi, there is not enough information for me to try troubleshoot this issue. Can you strip your code down to a simple example? Make sure you;re not using NucleusLayout inside of a fragment stack.

ml-bright commented 7 years ago

thank you, it's my problem, i has solve it.