public void specifyLines(int line_num){
  int childNum=0;
  if (line_num > lineNumList.size()) {
    line_num=lineNumList.size();
  }
  for (int i=0; i < line_num; i++) {
    childNum+=lineNumList.get(i);
  }
  List<View> viewList=new ArrayList<>();
  for (int i=0; i < childNum; i++) {
    viewList.add(getChildAt(i));
  }
  removeAllViews();
  for (  View v : viewList) {
    addView(v);
  }
}

public void specifyLines ( int line_num ) { int childNum = 0 ; if ( line_num > lineNumList . size ( ) ) { line_num = lineNumList . size ( ) ; } for ( int i = 0 ; i < line_num ; i ++ ) { childNum += lineNumList . get ( i ) ; } List < View > viewList = new ArrayList < > ( ) ; for ( int i = 0 ; i < childNum ; i ++ ) { viewList . add ( getChildAt ( i ) ) ; } removeAllViews ( ) ; for ( View v : viewList ) { addView ( v ) ; } }
cut the flowlayout to the specified num of lines
