| java.lang.Object | ||
| ↳ | android.support.v7.widget.RecyclerView.Adapter<VH extends android.support.v7.widget.RecyclerView.ViewHolder> | |
| ↳ | com.github.droidpl.android.jsonviewer.RVJsonAdapter | |
Adapter that is able to visualise the json object or json array in a recycler view.
| 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
| |||||||||||
Constructor to create the recycler adapter with an object.
| context | The context. |
|---|---|
| json | The json object to display. |
| listener | The listener. |
Constructor to create the recycler adapter with an array.
| context | The context. |
|---|---|
| array | The json array. |
| listener | The listener. |
Without any object.
| context | opens it with any object. |
|---|