/android-wrap-layout-manager

[Depreaced v23.2] LayoutManager which supports WRAP_CONTENT

Primary LanguageJavaOtherNOASSERTION

Wrap LayoutManager

Description

Usage example:

final WrapLinearLayoutManager layoutManager = new WrapLinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
final RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
recyclerView.setLayoutManager(layoutManager);
recyclerView.addItemDecoration(new DividerItemDecoration(this, null));
recyclerView.setAdapter(adapter);

Note that if the child views in your RecyclerView have the fixed size LinearLayoutManager#setChildSize should be used to avoid unnecessary measuring.

Installation

build.gradle via jcenter:

repositories {
    // ...
    jcenter()
}

dependencies {
    // ...
    compile 'com.infstory:android-wrap-layout-manager:0.0.6'
}

build.gradle via jitpack:

repositories {
    // ...
    maven { url "https://jitpack.io" }
}

dependencies {
    // ...
    compile 'com.github.yongjhih:android-wrap-layout-manager:-SNAPSHOT'
}

Credit

Reference

License

Library is distributed under Apache 2.0 license, see LICENSE.txt

Applications

The following applications use this library: