将FlowLayout的android:layout_width属性设为"match_parent",android:layout_height属性设为"wrap_content";此外,给FlowLayout加上背景色,这样就能直观看到我们算出的区域尺寸。