Skip to content

Instantly share code, notes, and snippets.

@ixiyang
ixiyang / gist:7922825
Last active July 18, 2019 15:28
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