视图不更新,直到MapView的感动 [英] Views Don't Update Until MapView is Touched

查看:147
本文介绍了视图不更新,直到MapView的感动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个主要由一个大的MapView的一个活动。在那个图形页面的上方,我有一对夫妇,我正在试图通过编程互动等意见的。

I have an Activity that mostly consists of a large MapView. On top of that MapView, I have a couple of other Views that I'm attempting to interact with programmatically.

当我试图用一个AnimationListener动画上的MapView顶部视图中的一个发生在我的第一个问题。该AnimationListener不会开火,直到我感动的MapView。这是由固定开沟AnimationListener并调用 setVisibility()等code顺序。这并不理想,但它工作正常。

My first problem occurred when I tried to use an AnimationListener to animate one of the Views on top of the MapView. The AnimationListener would not fire until I touched the MapView. This was fixed by ditching the AnimationListener and calling setVisibility() and other code sequentially. It's not ideal, but it works fine.

试图更新一个TextView这是对的MapView的顶部时,会出现我现在的问题。我设置的文本,但它不显示,直到我身体接触的MapView。我试过请求对焦等东西,但无济于事。

My current problem occurs when trying to update a TextView that's on top of the MapView. I set the text, but it doesn't display until I physically touch the MapView. I've tried requesting focus and other things but to no avail.

有其他人经历了这一点,并拿出一个可行的解决方案?

Has anybody else experienced this and come up with a working solution?

推荐答案

您可以致电 map.invalidate()刷新图形页面

这篇关于视图不更新,直到MapView的感动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆