我在 LinearLayout 中有一个 imageView,当我在该 LinearLayout 上调用 invalidate 时,它不会失效,直到手机 hibernate 并再次唤醒。
是否有办法强制 LinearLayout 立即失效?
最佳答案
来自关于无效函数的android文档
Invalidate the whole view. If the view is visible, onDraw(android.graphics.Canvas) will be called at some point in the future. This must be called from a UI thread. To call from a non-UI thread, call postInvalidate().
关于java - Android:使线性布局无效不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14552831/