Skip to content

Instantly share code, notes, and snippets.

@boxme
boxme / gist:659843a26e90ab76629128668bd8b97c
Created April 18, 2016 10:11 — forked from ixiyang/gist:7922825
difference between requestLayout() and forceLayout()
比喻很形象
Please note that the methods in Listing 1-10 are internal methods and are not part of the
public API, so they may change with newer releases. However, the underlying protocol would remain
the same.
In Listing 1-10, it is easier to first tell what forceLayout( ) is. It is like a touch command in build
environments. Usually when a file hasn’t changed, the build dependencies will ignore it. So, you
force that file to be compiled by “touch”ing, and thereby updating its time stamp. Just like touch,
the forceLayout( ) will not invoke any build commands by itself (unless your build environment is too