All Projects → abacritt → sectionedmergeadapter

abacritt / sectionedmergeadapter

Licence: Apache-2.0 license
Work with sub-sections in your Android ListView

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to sectionedmergeadapter

GenericRecyclerAdapter
Easiest way to use RecyclerView. Reduce boilerplate code! You don't need to write adapters for listing pages anymore!
Stars: ✭ 53 (+140.91%)
Mutual labels:  listview, android-listview
user profile
User profile UI designed in flutter
Stars: ✭ 14 (-36.36%)
Mutual labels:  listview
UnityDynamicScrollView
Dynamic scrollView based on UGUI
Stars: ✭ 161 (+631.82%)
Mutual labels:  listview
react-native-gridview
A React Native component that renders a grid of items. It uses ListView under the hood.
Stars: ✭ 16 (-27.27%)
Mutual labels:  listview
flutter sticky and expandable list
粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.
Stars: ✭ 116 (+427.27%)
Mutual labels:  listview
RecycleClick
Android recycler view not supports for onItemClickListner event. This library helps to wrap up and gain the missing recycle view item click and item long click functions. This library is a project carried by Lakitha, give a visit https://github.com/LakithaRav
Stars: ✭ 25 (+13.64%)
Mutual labels:  android-listview
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+940.91%)
Mutual labels:  listview
PinnedSectionRecyclerView
simple RecyclerView with pinned sections for Android.
Stars: ✭ 21 (-4.55%)
Mutual labels:  listview
ClassifySimpleDemo
二级列表,商品分类,RecyclerView,expanablelistview
Stars: ✭ 48 (+118.18%)
Mutual labels:  listview
SwiftListView
Instagram style - Collection of simple & neutral list views for Swift
Stars: ✭ 17 (-22.73%)
Mutual labels:  listview
WechatPopupWindow
高仿微信聊天界面长按弹框样式
Stars: ✭ 71 (+222.73%)
Mutual labels:  listview
Android-Firewall
Basic netguard app from playstore ,reduced to its minimum level for vpn and firewall logic
Stars: ✭ 41 (+86.36%)
Mutual labels:  listview
treelistview
A Pascal treelistview component, showing a treeview together with the columns of a listview (for Delphi and Lazarus)
Stars: ✭ 41 (+86.36%)
Mutual labels:  listview
react-expandable-listview
React expandable components, assist you render expandable objects or React components
Stars: ✭ 38 (+72.73%)
Mutual labels:  listview
AdvancedList-SwiftUI
MOVED to https://github.com/crelies/AdvancedList | Advanced list with empty, error and loading state implemented with SwiftUI
Stars: ✭ 41 (+86.36%)
Mutual labels:  listview
Shswiperefreshlayout
Android 升级版 SwipeRefreshLayout,支持RecyclerView、ScrollView等大部分组件,下拉刷新(Refresh)和上拉加载(Loadmore),支持自定义HeaderView和FooterView
Stars: ✭ 236 (+972.73%)
Mutual labels:  listview
ObjectListView
ObjectListView is a .NET ListView wired on caffeine, guarana and steroids. More calmly, it is a C# wrapper around a .NET ListView, which makes the ListView much easier to use and teaches it lots of neat new tricks.
Stars: ✭ 72 (+227.27%)
Mutual labels:  listview
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (+172.73%)
Mutual labels:  listview
TwerkyListView
A beautifully animated recycler-list-view, that twerks the way African earthworms do in order to move
Stars: ✭ 19 (-13.64%)
Mutual labels:  listview
ListViewWithSubListView
Xamarin.Forms Expandable ListView With Sub-ListView MVVM Pattern
Stars: ✭ 40 (+81.82%)
Mutual labels:  listview

SectionedMergeAdapter

This is a library based on MergeAdapter by CommonsWare. It allows you to work with sections and subheaders in your ListViews. With this library, you get the advantage of stitching together the rows and the header of the subsection in the subsection itself. For example, if there are no rows in a subsection of the ListView, the header of the subsection is also not shown.

Installation

Add the JitPack repository to your build file.

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
        maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
    }
}

Add the dependency

dependencies {
    compile 'com.github.abacritt:sectionedmergeadapter:0.2'
}

Or, simply clone the repository and import the module in your project.

Example code

ListView listView = (ListView) findViewById(android.R.id.list);

ArrayAdapter<String> adapter1 =
        new ArrayAdapter<>(this, R.layout.item_list, android.R.id.text1, arrayList1);
ArrayAdapter<String> adapter2 =
        new ArrayAdapter<>(this, R.layout.item_list, android.R.id.text1, arrayList2);
ArrayAdapter<String> adapter3 =
        new ArrayAdapter<>(this, R.layout.item_list, android.R.id.text1, arrayList3);

TextView tv1 = new TextView(this);
tv1.setText(R.string.header_1);
TextView tv2 = new TextView(this);
tv2.setText(R.string.header_2);
TextView tv3 = new TextView(this);
tv3.setText(R.string.header_3);

SectionedMergeAdapter adapter = new SectionedMergeAdapter();

adapter.addSection(new SectionedMergeAdapter.Section(tv1, adapter1));
adapter.addSection(new SectionedMergeAdapter.Section(tv2, adapter2));
adapter.addSection(new SectionedMergeAdapter.Section(tv3, adapter3));

listView.setAdapter(adapter);

Note

Since SectionedMergeAdapter is extending from the MergeAdapter, you can use other MergeAdapter functionalities like addView(), addViews() and addAdapter() with this library.

For a detailed list of things supported with MergeAdapter check out CWAC MergeAdapter.

Screenshot

Screenshot

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].