recyclerview-binder alternatives and similar packages
Based on the "Recyclerview Widget" category.
Alternatively, view recyclerview-binder alternatives based on common mentions on social networks and blogs.
-
recyclerview-animators
An Android Animation library which easily add itemanimator to RecyclerView items. -
UltimateRecyclerView
A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features. -
XRecyclerView
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView -
android-advancedrecyclerview
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting) -
sticky-headers-recyclerview
DISCONTINUED. [UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView -
RecyclerView-FlexibleDivider
Android library providing simple way to control divider items (ItemDecoration) of RecyclerView -
ScrollablePanel
A flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView. It different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location. -
RecyclerViewEnhanced
Android Library to provide swipe, click and other functionality to RecyclerView -
SectionedRecyclerView
DISCONTINUED. An adapter to create Android RecyclerViews with sections, providing headers and footers. -
Dividers
DISCONTINUED. Dividers is a simple Android library to create easy separators for your RecyclerViews -
RecyclerView-MultipleViewTypesAdapter
Android library defining adapter classes of RecyclerView to manage multiple view types -
RecyclerViewSwipeDismiss
A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView. -
PowerfulRecyclerViewAdapter
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc. -
InfiniteRecyclerView
A RecyclerView Adapter which allows you to have an Infinite scrolling list in your apps -
VsRecyclerView
The library that removes all boilerplate code allowing you to display lists with few lines of code. -
android RecyclerView support Header Footer and Empty list
android RecyclerView support Header Footer and Empty list
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of recyclerview-binder or a related project?
README
recyclerview-binder
Android Library for RecyclerView to manage order of items and multiple view types.
Features
- Insert any items to wherever you want without calculating their position.
- Insert any items in desired order regardless of the order of calling 'add/insert'.
- Separate implementations for each view type into their own classes.
- Support RxJava.
Sample
Gradle
repositories {
jcenter()
}
dependencies {
compile 'jp.satorufujiwara:recyclerview-binder:1.3.2'
}
Quick Start
ViewType decides RecyclerView item's layout.
public enum BinderSampleViewType implements ViewType {
VIEW_TYPE_1,
VIEW_TYPE_2,
VIEW_TYPE_3;
@Override
public int viewType() {
return ordinal();
}
}
Binder binds data to Views in RecyclerView item.
public class DataBinder1 extends RecyclerBinder<BinderSampleViewType> {
private final String text;
public DataBinder1(Activity activity, String text) {
super(activity, BinderSampleViewType.VIEW_TYPE_1);
this.text = text;
}
@Override
public int layoutResId() {
return R.layout.binder_data_1;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(View v) {
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
ViewHolder holder = (ViewHolder) viewHolder;
holder.textSection.setText(text);
}
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView textSection;
public ViewHolder(View view) {
super(view);
textSection = (TextView) view.findViewById(R.id.text_section);
}
}
}
Binder added to Adapter is layouted in order of Section.
RecyclerBinderAdapter<BinderSampleSection, BinderSampleViewType> adapter
= new RecyclerBinderAdapter<>();
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(adapter);
adapter.add(BinderSampleSection.SECTION_1, new DataBinder1(getActivity(), "in Section1"));
adapter.add(BinderSampleSection.SECTION_1, new DataBinder2(getActivity(), "in Section1"));
adapter.add(BinderSampleSection.SECTION_1, new DataBinder3(getActivity(), "in Section1"));
adapter.add(BinderSampleSection.SECTION_3, new DataBinder2(getActivity(), "in Section3"));
adapter.add(BinderSampleSection.SECTION_3, new DataBinder1(getActivity(), "in Section3"));
adapter.add(BinderSampleSection.SECTION_2, new DataBinder3(getActivity(), "in Section2"));
adapter.add(BinderSampleSection.SECTION_2, new DataBinder2(getActivity(), "in Section2"));
adapter.add(BinderSampleSection.SECTION_2, new DataBinder1(getActivity(), "in Section2"));
}
enum BinderSampleSection implements Section {
SECTION_1,
SECTION_2,
SECTION_3;
@Override
public int position() {
return ordinal();
}
}
Usage
1. Create class implemented ViewType
Enum is useful for this class.
2. Create classes extends RecyclerBinder
The number of these classes is the same to number of ViewType in Step 1.
3. Create class implemented Section
Enum is useful for this class.
4. Create RecyclerBinderAdapter
RecyclerBinderAdapter<Section, ViewType> adapter = new RecyclerBinderAdapter<>();
5. Control RecyclerView
adapter.add(Section.SECTION_1, binder);
adapter.addIfEmpty(Section.SECTION_1, binder);
adapter.addAll(Section.SECTION_1, List<RecyclerBinder> binders);
adapter.insert(Section.SECTION_1, binder, index);
adapter.remove(Section.SECTION_1, binder);
adapter.removeAll(Section.SECTION_1);
adapter.replaceAll(Section.SECTION_1, List<RecyclerBinder> binders);
adapter.clear();
Use with RxJava
If subscibe observable in RecyclerBinder
classes, use RxRecyclerBinder
and bindToLifecycle()
.
myObservable
.compose(bindToLifecycle())
.subscribe();
When item removed from adapter, observable unsubscribe.
Note : Due to the unsubscription works, please call RecyclerBinderAdapter.clear()
in Activity.onDestroy()
or Fragment.onDestroyView()
.
License
Copyright 2015 Satoru Fujiwara
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the recyclerview-binder README section above
are relevant to that project's source code only.