public class

RVJsonAdapter

extends RecyclerView.Adapter<VH extends RecyclerView.ViewHolder>
java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.Adapter<VH extends android.support.v7.widget.RecyclerView.ViewHolder>
     ↳ com.github.droidpl.android.jsonviewer.RVJsonAdapter

Class Overview

Adapter that is able to visualise the json object or json array in a recycler view.

Summary

Nested Classes
interface RVJsonAdapter.JsonListener Listener to return the object clicked if it is a complex one. 
class RVJsonAdapter.ViewHolder The view holder for the adapter. 
Public Constructors
RVJsonAdapter(Context context, JSONObject json, RVJsonAdapter.JsonListener listener)
Constructor to create the recycler adapter with an object.
RVJsonAdapter(Context context, JSONArray array, RVJsonAdapter.JsonListener listener)
Constructor to create the recycler adapter with an array.
RVJsonAdapter(Context context)
Without any object.
Public Methods
int getItemCount()
void onBindViewHolder(RVJsonAdapter.ViewHolder holder, int position)
RVJsonAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
[Expand]
Inherited Methods
From class android.support.v7.widget.RecyclerView.Adapter
From class java.lang.Object

Public Constructors

public RVJsonAdapter (Context context, JSONObject json, RVJsonAdapter.JsonListener listener)

Constructor to create the recycler adapter with an object.

Parameters
context The context.
json The json object to display.
listener The listener.

public RVJsonAdapter (Context context, JSONArray array, RVJsonAdapter.JsonListener listener)

Constructor to create the recycler adapter with an array.

Parameters
context The context.
array The json array.
listener The listener.

public RVJsonAdapter (Context context)

Without any object.

Parameters
context opens it with any object.

Public Methods

public int getItemCount ()

public void onBindViewHolder (RVJsonAdapter.ViewHolder holder, int position)

public RVJsonAdapter.ViewHolder onCreateViewHolder (ViewGroup parent, int viewType)