当我的 Activity 获得焦点时会调用哪个方法? (打电话后,后退键,主页键等......)

发布于 2024-10-04 09:34:41 字数 247 浏览 1 评论 0原文

我的应用程序有问题。它有很多活动。其中两个有谷歌地图视图。我的 A 活动有一个完整的 MapView,我的 B 活动有一个小的 MapView。好的,当我在 B 活动中,有时按返回键直到返回 A 活动时,A 活动的地图显示错误,屏幕底部有一个黑色区域。仅当我从 B 活动按回时才会发生这种情况。

因此,我需要知道 A 获得焦点时调用哪个方法,因为我需要实现/覆盖它以从头开始重新绘制所有窗口。

另外,我必须输入哪些代码才能从头开始重新绘制所有窗口?

I have a problem with my app. It has a lot of activities. Two of them have google map views. My A activity has a full MapView and my B activity has a small MapView. OK, when I am on the B activity and press back key sometimes until I return to my A activity, the map of my A activity shows with errors, with a black zone on the bottom of the screen. This only happens when I press back from the B activity.

Because of this I need to know which method is called in A when it gets the focus, because I need to implement/override it to REPAINT ALL THE WINDOW AGAIN FROM SCRATCH.

Also which code I have to put to repaint all the window from scratch?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

有木有妳兜一样 2024-10-11 09:34:41
@Override
public void onResume() {
 super.onResume();

}
@Override
public void onResume() {
 super.onResume();

}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文