All Projects → TheKhaeng → Recycler View Margin Decoration

TheKhaeng / Recycler View Margin Decoration

Licence: apache-2.0
A library for add margin each item in RecyclerView.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Recycler View Margin Decoration

Snappyrecyclerview
An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
Stars: ✭ 178 (-17.97%)
Mutual labels:  recyclerview
Easyadapter
This project demonstrates simple approach for implementation complex lists, based on RecyclerView.
Stars: ✭ 187 (-13.82%)
Mutual labels:  recyclerview
Tabscrollattacher
Attach TabLayout and RecyclerView. Useful for categorizing RecyclerView items.
Stars: ✭ 196 (-9.68%)
Mutual labels:  recyclerview
Sortrecyclerviewlist
Recyclerview实现字母排序,过滤搜索,顶部悬浮,波浪形的侧边栏
Stars: ✭ 179 (-17.51%)
Mutual labels:  recyclerview
Sherlockadapter
一个万能的封装了RecyclerView.Adapter的功能库。
Stars: ✭ 186 (-14.29%)
Mutual labels:  recyclerview
Diffadapter
A high-performance , easy-to-use Adapter for RecyclerView ,using diffutil
Stars: ✭ 193 (-11.06%)
Mutual labels:  recyclerview
Customadapter
RV Adapter 优雅封装,抽取列表模版,可以快速的添加一个列表,使用组装的方式构建Adapter,抽象Cell 角色,负责创建ViewHolder,绑定数据和逻辑处理。Cell为一个独立的组件。
Stars: ✭ 172 (-20.74%)
Mutual labels:  recyclerview
Kohii
Android Video Playback made easy.
Stars: ✭ 204 (-5.99%)
Mutual labels:  recyclerview
Skeletonlayout
Skeleton view pattern for Android
Stars: ✭ 186 (-14.29%)
Mutual labels:  recyclerview
Advancedrecyclerview
An easy, empowering Kotlin library for RecyclerView
Stars: ✭ 197 (-9.22%)
Mutual labels:  recyclerview
Nopaginate
Android pagination library (updated 01.05.2018)
Stars: ✭ 180 (-17.05%)
Mutual labels:  recyclerview
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (-15.67%)
Mutual labels:  recyclerview
Shimmer Recyclerview X
🌀 ShimmerRecyclerViewX for AndroidX
Stars: ✭ 193 (-11.06%)
Mutual labels:  recyclerview
Placeholderview
This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
Stars: ✭ 2,104 (+869.59%)
Mutual labels:  recyclerview
Smilerefresh
微笑下拉刷新。这是在 SwipeRefreshLayout基础上修改的下拉刷新库。
Stars: ✭ 203 (-6.45%)
Mutual labels:  recyclerview
Airbnb Android Google Map View
This is a sample Android Application which has Google Map view similar to what AirBnb Android Application. Moving Markers like Uber/Ola. Custom Google Search for places. Recycler view with Animations added.
Stars: ✭ 175 (-19.35%)
Mutual labels:  recyclerview
Moretype
new method to build data in RecyclerView with Kotlin!
Stars: ✭ 189 (-12.9%)
Mutual labels:  recyclerview
Licenseadapter
adapter for RecyclerView to display app's oss dependencies' license
Stars: ✭ 209 (-3.69%)
Mutual labels:  recyclerview
Flap
Flap(灵动),一个基于 RecyclerView 的页面组件化框架。
Stars: ✭ 204 (-5.99%)
Mutual labels:  recyclerview
Multiselectadapter
MultiSelectAdapter可以让你的Adapter快速实现多选和批量操作
Stars: ✭ 195 (-10.14%)
Mutual labels:  recyclerview

「 RecyclerView Margin Decoration 」

alt text

Build Status Download Android Arsenal

A library for add margin each item in RecyclerView.

「 New UPDATE 」

  • version 1.2.1 - support RTL language

「 DEMO APPLICATION 」

「 Installation 」

Maven

<dependency>
  <groupId>com.github.thekhaeng</groupId>
  <artifactId>recycler-margin</artifactId>
  <version>1.2.1</version>
  <type>pom</type>
</dependency>

Gradle

compile ('com.github.thekhaeng:recycler-margin:1.2.1') {
    exclude group: 'com.android.support', module: 'recyclerview-v7'
}

「 Usage 」

For LinearLayoutManager

recyclerView.addItemDecoration( new LayoutMarginDecoration( 1, spaceInPx ) );

For GridLayoutManager

recyclerView.addItemDecoration( new LayoutMarginDecoration( yourColumn, spaceInPx ) );

For StaggeredGridLayoutManager

recyclerView.addItemDecoration( new LayoutMarginDecoration( yourColumn, spaceInPx ) );

Set padding

LayoutMarginDecoration layoutMargin = new LayoutMarginDecoration( gridSpan, itemSpace );

layoutMargin.setPadding(recyclerView, top, bottom, left, right );

or

layoutMargin.setPadding(recyclerView, padding );

or use xml

<android.support.v7.widget.RecyclerView
    ...
    android:padding="16dp"
    android:clipToPadding="false"
    android:scrollbarStyle="outsideOverlay"
    ...
    />

Click listener

LayoutMarginDecoration layoutMargin = new LayoutMarginDecoration( spaceInPx );

layoutMargin.setOnClickLayoutMarginDecorationItemListener( new OnClickLayoutMarginDecorationItemListener(){
     @Override
     public void onClick( Context context, View v, int position, int spanIndex, RecyclerView.State state ){
         Toast.makeText( context, "item: " + position + "\ncolumn: " + spanIndex, Toast.LENGTH_SHORT ).show();
     }
);

Licence

Copyright 2017 TheKhaeng

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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.

Developed By Thai android developer.

alt text

Follow facebook.com/thekhaeng.io on Facebook page. or @nonthawit at my Medium blog. :)

For contact, shoot me an email at [email protected]

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