What is the difference between build().perform() and perform()

前端 未结 3 630
夕颜
夕颜 2021-01-16 21:45

Some articles suggest that now build() is included in perform() itself, while others suggest that build().perform() is used when multi

3条回答
  •  Happy的楠姐
    2021-01-16 22:25

    1. build() - Generates a composite action containing all actions so far, ready to be performed (and resets the internal builder state, so subsequent calls to build() will contain fresh sequences).

    2. perform() A convenience method for performing the actions without calling build() first.

    So, whenever going for composite actions (multiple actions) use build().perform(), else perform().

提交回复
热议问题