Skip to content
forked from HamidrezaAmz/Rele

This is a custom view include: RecyclerView,Empty View, Loading View, Error View

Notifications You must be signed in to change notification settings

rupeshsasne/Rele

 
 

Repository files navigation

API

Rele

error empty loading

This is a custom view include: Recycler-View, Empty-View, Loading-View, Error-View.

It can handle multiple UI states that we have on setting data into recycler-view in android. You just need to set state on this custom view.

Getting Started

These instructions will help you to use this library inside your projects

Prerequisites

This library was built with androidX, so you should migrate into androidX to use this library with out any problem. For migration you can use Migrating to AndroidX

Installing

Step 1. Add the JitPack repository to your build file, Add it in your root build.gradle at the end of repositories:

allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

Step 2. Add the dependency

dependencies {
    implementation 'com.github.HamidrezaAmz:Rele:1.3.0'
}

Here we go for implementation

Add xml of custom view into your parent view

<com.vasl.recyclerlibrary.MyCustomView
        android:id="@+id/myCustomView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

Refrence to custom-view inside your activity or fragment (I use butterknife)

 @BindView(R.id.myCustomView)
 MyCustomView myCustomView;

For getting recycler-view

RecyclerView recyclerView = myCustomView.getRecyclerView();

For setting status

myCustomView.setStatus(ListStatuse.LOADING);

List of statuses

  • ListStatus.LOADING
  • ListStatus.LOADING_BOTTOM
  • ListStatus.FAILURE
  • ListStatus.EMPTY
  • ListStatus.SUCCESS

Other Libraries

Author

  • Hamidreza amoozadeh - Android DEV - github

Supported Languages

  • English, Persian

About

This is a custom view include: RecyclerView,Empty View, Loading View, Error View

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%