GcsSloop / GcsSloop/AndroidNote

请教一下, 为什么对View宽高修改了不要调用super.onMeasure

Open
#101 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

请教一下,在安卓自定义View进阶-分类与流程中有一个,注意

如果对View的宽高进行修改了,不要调用 super.onMeasure( widthMeasureSpec, heightMeasureSpec); 要调用 setMeasuredDimension( widthsize, heightsize); 这个函数。

这是为什么?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.