SmartRecyclerView

public final class SmartRecyclerView extends RecyclerView

SmartRecyclerView is a custom RecyclerView that can show emptyView when adapter is empty.

Constructors

Properties

Link copied to clipboard
private final SmartRecyclerView.<no name provided> dataObserver

AdapterDataObserver to check if adapter is empty

Link copied to clipboard
private View mEmptyView

EmptyView to show when adapter is empty

Functions

Link copied to clipboard
private final Unit checkIfEmpty()

Check if adapter connected to SRV is empty. If so, show emptyView.

Link copied to clipboard
private final SmartRecyclerView.<no name provided> getDataObserver()

AdapterDataObserver to check if adapter is empty

Link copied to clipboard
private final View getMEmptyView()

EmptyView to show when adapter is empty

Link copied to clipboard
public Unit setAdapter(RecyclerView.Adapter<?> adapter)

Set adapter to SRV

Link copied to clipboard
public final Unit setEmptyView(View emptyView)

Set emptyView to SRV

Link copied to clipboard
private final Unit setMEmptyView(View mEmptyView)

EmptyView to show when adapter is empty