Skip to content

A android flow layout which can add child view via a adapter.

License

Notifications You must be signed in to change notification settings

junhaozhou/android-flow-layout

Repository files navigation

Android Flow Layout

A android flow layout which can add child view via a adapter.

Features

  • support adapter
  • support gravity: start, center, end and align
  • support line padding

Usage

In xml:

<com.littlechoc.flowlayout.FlowLayout
        android:id="@+id/flow_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:fl_linePadding="2dp" // the padding between lines except header and footer
        app:fl_maxLines="2"
        app:fl_gravity="align"
        />

In code:

Extend FlowLayoutAdapter and add the adapter to FlowLayout via FlowLayout.setAdapter(). You can see this code in module sample.

Install

dependecies{
  compile 'com.littlechoc.flowlayout:flowlayout:0.0.3'
}

TODO

  • support choice mode singleandmulti

About

A android flow layout which can add child view via a adapter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages