All Projects → magiepooh → Recycleritemdecoration

magiepooh / Recycleritemdecoration

ItemDecoration for RecyclerView using LinearLayoutManager for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Recycleritemdecoration

FlexItemDecoration
FlexItemDecoration, can customize the head, bottom, leftmost, rightmost dividing line, but also customize any one of the dividing lines and batch custom multiple dividing lines
Stars: ✭ 52 (-83.75%)
Mutual labels:  recyclerview
Recyclerviewevent
RecyclerView onItemClick、onItemLongClick、drag、swipe、divider、reuse disorder RecyclerView 梳理:点击&长按事件、分割线、拖曳排序、滑动删除、优雅解决 EditText 和 CheckBox 复用错乱问题
Stars: ✭ 265 (-17.19%)
Mutual labels:  recyclerview
Kiel
Kotlin way of building RecyclerView Adapter 🧩. You do not have to write RecyclerView Adapters again and again and suffer from handling of different view types. Kiel will help you.
Stars: ✭ 297 (-7.19%)
Mutual labels:  recyclerview
RecyclerELE
Android Library for easy addition of Empty, Loading and Error views in a RecyclerView
Stars: ✭ 27 (-91.56%)
Mutual labels:  recyclerview
Tableview
TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
Stars: ✭ 2,928 (+815%)
Mutual labels:  recyclerview
Citypicker
🔥🔥🔥城市选择、定位、搜索及右侧字母导航,类似美团 百度糯米 饿了么等APP选择城市功能
Stars: ✭ 2,973 (+829.06%)
Mutual labels:  recyclerview
adapster
Android library designed to enrich and make your RecyclerView adapters more SOLID
Stars: ✭ 17 (-94.69%)
Mutual labels:  recyclerview
Boardview
A draggable boardview for java android (Kanban style)
Stars: ✭ 309 (-3.44%)
Mutual labels:  recyclerview
Transformerslayout
🔥 App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
Stars: ✭ 258 (-19.37%)
Mutual labels:  recyclerview
Chipslayoutmanager
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features
Stars: ✭ 3,138 (+880.63%)
Mutual labels:  recyclerview
Jetpack-compose-sample
Forget about bunch of XML files for maintaining UIs. Jetpack Compose is Android’s modern toolkit for building native UI. Here is a small example to get started.
Stars: ✭ 29 (-90.94%)
Mutual labels:  recyclerview
SpannedGridLayoutManager
Android RecyclerView.LayoutManager that resizes and reorders views based on SpanSize
Stars: ✭ 522 (+63.13%)
Mutual labels:  recyclerview
Aiforms.settingsview
SettingsView for Xamarin.Forms
Stars: ✭ 274 (-14.37%)
Mutual labels:  recyclerview
Polet
A solution to compose RecyclerView Decoration
Stars: ✭ 23 (-92.81%)
Mutual labels:  recyclerview
Cardslideview
一行代码实现ViewPager卡片效果,比ViewPager2更强大,底层同样是RecyclerView
Stars: ✭ 301 (-5.94%)
Mutual labels:  recyclerview
ClockScroller
A cool animated RecyclerView clock face scroller handle inspired by the following MaterialUp submission - https://material.uplabs.com/posts/codepen-scrolling-clock
Stars: ✭ 75 (-76.56%)
Mutual labels:  recyclerview
Android Pagination With Recyclerview
Pagination (Endless or Infinite Scrolling) using RecyclerView's onScrollListener
Stars: ✭ 269 (-15.94%)
Mutual labels:  recyclerview
Tvrecyclerview
A custom RecyclerView for Android TV end
Stars: ✭ 320 (+0%)
Mutual labels:  recyclerview
Byrecyclerview
🔥 RecyclerView 下拉刷新、加载更多、item点击/长按、头布局/尾布局/状态布局、万能分割线、Skeleton骨架图、极简adapter(RV/LV)等
Stars: ✭ 290 (-9.37%)
Mutual labels:  recyclerview
Demo Recyclerviewenteranimation
Demo project for a blog post
Stars: ✭ 289 (-9.69%)
Mutual labels:  recyclerview

RecyclerItemDecoration

Download Android Arsenal

RecyclerItemDecoration allows you to draw divider between items in recyclerview with multiple ViewType without considering items' positions!

When using recyclerView with different ViewType, you either have only one simple divider or different types of dividers. When you want to draw different dividers between recyclerView's items, basically you must consider items' position; often you need to have separate ItemDecoration's behaviors declared in your code using switch cases or if statements. For example, each time items' position changes happen, you must rewrite ItemDecoration's behaviors.

You don't need to think about items' position! You need to care about their ViewType!!

Image

demo_vertical demo_horizontal

Support

  • LinearLayoutManager
    • Vertical
    • Horizontal
    • Horizontal(Reverse)

Gradle

implementation 'com.github.magiepooh:recycler-itemdecoration:[email protected]'

How To Use

RecyclerView.ItemDecoration decoration = ItemDecorations.vertical(this)
                .first(R.drawable.shape_decoration_green_h_16)
                .type(DemoViewType.LANDSCAPE_TILE.ordinal(), R.drawable.shape_decoration_cornflower_lilac_h_8)
                .type(DemoViewType.LANDSCAPE_ITEM.ordinal(), R.drawable.shape_decoration_gray_h_12_padding)
                .type(DemoViewType.LANDSCAPE_DESCRIPTION.ordinal(), R.drawable.shape_decoration_red_h_8)
                .last(R.drawable.shape_decoration_flush_orange_h_16)
                .create();

recyclerView.addItemDecoration(decoration);

Credit

License

Copyright (C) 2015 magiepooh
Copyright (C) 2013 The Android Open Source Project

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 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].