Linear Layout Manager which supports WRAP_CONTENT
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
RecyclerView supports WRAP_CONTENT starting from Android Support Library 23.2. More details here: http://android-developers.blogspot.se/2016/02/android-support-library-232.html
Implementation of LinearLayoutManager which wraps its contents.
final LinearLayoutManager layoutManager = new org.solovyev.android.views.llm.LinearLayoutManager(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.
compile 'org.solovyev.android.views:linear-layout-manager:[email protected]'
xml org.solovyev.android.views linear-layout-manager 0.5 apklib
Library is distributed under Apache 2.0 license, see LICENSE.txt