public class

FormFillAdapter

extends
java.lang.Object
   ↳
     ↳ com.pdftron.pdf.adapter.FormFillAdapter

Class Overview

Adapter class used in DialogFormFillChoice.

Summary

Nested Classes
interface FormFillAdapter.OnItemSelectListener Callback interface invoked when an item is selected. 
Public Constructors
FormFillAdapter(Field field, HashSet<Integer> selectedPositions, FormFillAdapter.OnItemSelectListener listener)
Class constructor
Public Methods
void clearSingleSelectedPosition()
Removes the selected item for single item choice cases
int getItemCount()
The overloaded implementation of RecyclerView.Adapter#getItemCount().
HashSet<Integer> getSelectedPositions()
Gets selected position for multiple choice cases
int getSingleSelectedPosition()
Gets selected position for single choice cases
boolean hasSingleSelectedPosition()
Whether this form fill is single choice case and is selected
void onBindViewHolder(FormFillAdapter.ViewHolder holder, int position)
The overloaded implementation of RecyclerView.Adapter#onBindViewHolder(RecyclerView.ViewHolder, int).
FormFillAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
The overloaded implementation of RecyclerView.Adapter#onCreateViewHolder(ViewGroup, int).
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FormFillAdapter (Field field, HashSet<Integer> selectedPositions, FormFillAdapter.OnItemSelectListener listener)

Class constructor

Parameters
field The field
selectedPositions The selected positions
listener The listener

Public Methods

public void clearSingleSelectedPosition ()

Removes the selected item for single item choice cases

public int getItemCount ()

The overloaded implementation of RecyclerView.Adapter#getItemCount().

public HashSet<Integer> getSelectedPositions ()

Gets selected position for multiple choice cases

Returns
  • selected position for multiple choice cases

public int getSingleSelectedPosition ()

Gets selected position for single choice cases

Returns
  • selected position for single choice cases (-1 if no item has been selected)

public boolean hasSingleSelectedPosition ()

Whether this form fill is single choice case and is selected

Returns
  • True if it is single choice case and one item is selected

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

The overloaded implementation of RecyclerView.Adapter#onBindViewHolder(RecyclerView.ViewHolder, int).

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

The overloaded implementation of RecyclerView.Adapter#onCreateViewHolder(ViewGroup, int).