1.首先新建一个FlowLayout类,继承自ViewGroup 2.在onMeasure中根据child views计算出FlowLayout高度 3.在onLayout中对child Views进行布局