Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#101 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java

Research direction

Start with the AndroidNote section titled “安卓自定义View进阶-分类与流程” and review its guidance on onMeasure, super.onMeasure, and setMeasuredDimension. Compare the two behaviors in Android custom View measurement, then update the section with a clear explanation answering why the latter is used when dimensions are changed; no file or test is named.

Written by the indexing model from the issue text.

Description

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

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

这是为什么?

Dominant language
Java
Stars
9.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GcsSloop/AndroidNote

All issues in GcsSloop/AndroidNote

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.