您的位置:首页 > 移动开发 > Android开发

android.view.View.setWillNotDraw(boolean willNotDraw)

2016-07-26 11:23 585 查看

一般用于viewgroup,为true时,不执行viewgroup的onDraw(Canvas canvas)方法

public void setWillNotDraw
(boolean willNotDraw)

Added in
API level 1

If this view doesn't do any drawing on its own, set this flag to allow further optimizations. By default, this flag is not set on View, but could be set on some View subclasses such as ViewGroup. Typically, if you override
onDraw(android.graphics.Canvas)
you should clear this flag.

Parameters
willNotDrawwhether or not this View draw on its own
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: