Java – use activity When recreate(), the screen flashes black for 0.5 seconds
•
Java
When using activity When the recreate () screen flashes black for 0.5 seconds, you can solve the problem anyway, so it won't flash Or using activity Fade out the entire screen to black before recreate()?
Solution
Try to make two layouts, one with a hidden view and the other with all elements, and use setcontentview (layouteid); To switch between them, if you have a listener on the UI element, move the collection listener from oncraete () to onresume () and call it when the layout is switched
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码