Android streaming layout with filtering function, filtering android streaming Layout
FilterFlowLayout
 
For stream layout with filter functions, see FlowLayout
 
 
 - Remove sub-views whose width is not in the range (proportion or actual value)
  
 - You can set the maximum number of rows.
  
 - You can add horizontal spacing between components.
  
 - You can add line spacing
  
 
System Requirements 
Android 4.0 or above
Quick Start 
<me.codeboy.android.lib.FilterFlowLayout    xmlns:cb="http://schemas.android.com/apk/res-auto"    android:id="@+id/filterFlowLayout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    cb:maxWidthRatio="0.5"    cb:minWidth="80dp"    cb:maxLines="3"    cb:horizontalGap="5dp"    cb:verticalGap="5dp"    >
 
 
 - The maximum width is half of the width of FlowLayout.
  
 - The minimum width is 80dp.
  
 - The maximum number of rows is 3.
  
 - Horizontal spacing: 5dp
  
 - Vertical spacing: 5dp
  
Xml configuration 
MaxWidthRatio: the maximum width ratio. relative to the total width of FlowLayout, the default value is-1 minWidthRatio. relative to the total width of FlowLayout, the default value is-1 maxWidth. The default value is 0 minWidth, the default value is 0. the maximum number of lines displayed in maxLines. The default value is Integer. MAX_VALUEhorizontalGap the gap between each row of sub-attempts. The default value is 0 verticalGap. The default value is 0.
Related Methods 
SetMaxChildWidth (float maxChildWidth) // setMinChildWidth (float minChildWidth) // setMaxLines (int maxLines) // setHorizontalGap (int horizontalGap) // set the horizontal spacing setVerticalGap (int verticalGap) // set the Vertical spacing
Notes 
 
 - When both the width ratio and the specific value are set in xml, the proportion priority is higher than the actual value.
  
 - If the width is not set, the maximum width is the width of FlowLayout.
  
 
Github address: https://github.com/androiddevelop/FilterFlowLayout 
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.