public class FastAdapterDialog<Item extends IItem>
extends AlertDialog
| Constructor and Description |
|---|
FastAdapterDialog(android.content.Context context) |
FastAdapterDialog(android.content.Context context,
int theme) |
| Modifier and Type | Method and Description |
|---|---|
FastAdapterDialog<Item> |
add(int position,
Item... items)
add an array of items at the given position within the existing items
|
FastAdapterDialog<Item> |
add(int position,
Item item)
add an item at the given position within the existing icons
|
FastAdapterDialog<Item> |
add(int position,
java.util.List<Item> items)
add a list of items at the given position within the existing items
|
FastAdapterDialog<Item> |
add(Item... items)
add an array of items to the end of the existing items
|
FastAdapterDialog<Item> |
add(Item item)
add an item at the end of the existing items
|
FastAdapterDialog<Item> |
add(java.util.List<Item> items)
add a list of items to the end of the existing items
|
FastAdapterDialog<Item> |
clear()
removes all items of this adapter
|
RecyclerView |
getRecyclerView() |
FastAdapterDialog<Item> |
move(int fromPosition,
int toPosition)
moves an item within the list from a position to a position
|
FastAdapterDialog<Item> |
remove(int position)
removes an item at the given position within the existing icons
|
FastAdapterDialog<Item> |
removeItemRange(int position,
int itemCount)
removes a range of items starting with the given position within the existing icons
|
FastAdapterDialog<Item> |
set(int position,
Item item)
sets an item at the given position, overwriting the previous item
|
FastAdapterDialog<Item> |
set(java.util.List<Item> items)
set a new list of items and apply it to the existing list (clear - add) for this adapter
|
FastAdapterDialog<Item> |
setNewList(java.util.List<Item> items)
sets a complete new list of items onto this adapter, using the new list.
|
void |
show()
Start the dialog and display it on screen.
|
FastAdapterDialog<Item> |
withAdapter(<any> adapter) |
FastAdapterDialog<Item> |
withButton(int whichButton,
int textRes,
OnClickListener listener)
Sets a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withButton(int whichButton,
java.lang.String text,
OnClickListener listener)
Sets a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withFastItemAdapter(<any> fastAdapter,
<any> itemAdapter) |
FastAdapterDialog<Item> |
withItems(Item... items) |
FastAdapterDialog<Item> |
withItems(java.util.List<Item> items) |
FastAdapterDialog<Item> |
withLayoutManager(RecyclerView.LayoutManager layoutManager)
Set the
RecyclerView.LayoutManager that the RecyclerView will use. |
FastAdapterDialog<Item> |
withNegativeButton(int textRes)
Adds a negative button to the dialog.
|
FastAdapterDialog<Item> |
withNegativeButton(int textRes,
OnClickListener listener)
Set a listener to be invoked when the negative button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withNegativeButton(java.lang.String text)
Adds a negative button to the dialog.
|
FastAdapterDialog<Item> |
withNegativeButton(java.lang.String text,
OnClickListener listener)
Set a listener to be invoked when the negative button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withNeutralButton(int textRes,
OnClickListener listener)
Set a listener to be invoked when the neutral button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withNeutralButton(java.lang.String text,
OnClickListener listener)
Set a listener to be invoked when the neutral button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withOnClickListener(<any> onClickListener)
Define the OnClickListener which will be used for a single item
|
FastAdapterDialog<Item> |
withOnLongClickListener(<any> onLongClickListener)
Define the OnLongClickListener which will be used for a single item
|
FastAdapterDialog<Item> |
withOnPreClickListener(<any> onPreClickListener)
Define the OnPreClickListener which will be used for a single item and is called after all internal methods are done
|
FastAdapterDialog<Item> |
withOnPreLongClickListener(<any> onPreLongClickListener)
Define the OnLongClickListener which will be used for a single item and is called after all internal methods are done
|
FastAdapterDialog<Item> |
withOnScrollListener(RecyclerView.OnScrollListener listener)
Add a listener that will be notified of any changes in scroll state or position of the
RecyclerView.
|
FastAdapterDialog<Item> |
withOnTouchListener(<any> onTouchListener)
Define the TouchListener which will be used for a single item
|
FastAdapterDialog<Item> |
withPositiveButton(int textRes,
OnClickListener listener)
Set a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withPositiveButton(java.lang.String text,
OnClickListener listener)
Set a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withTitle(int titleRes)
Set the title text for this dialog's window.
|
FastAdapterDialog<Item> |
withTitle(java.lang.String title)
Set the title text for this dialog's window.
|
public FastAdapterDialog(android.content.Context context)
public FastAdapterDialog(android.content.Context context,
int theme)
public FastAdapterDialog<Item> withTitle(java.lang.String title)
title - The text to display in the title.public FastAdapterDialog<Item> withTitle(int titleRes)
titleRes - The resource id of the text to display in the title.public FastAdapterDialog<Item> withFastItemAdapter(<any> fastAdapter, <any> itemAdapter)
public FastAdapterDialog<Item> withItems(java.util.List<Item> items)
public FastAdapterDialog<Item> withItems(Item... items)
public FastAdapterDialog<Item> withAdapter(<any> adapter)
public FastAdapterDialog<Item> withLayoutManager(RecyclerView.LayoutManager layoutManager)
RecyclerView.LayoutManager that the RecyclerView will use.layoutManager - LayoutManager to usepublic FastAdapterDialog<Item> withOnScrollListener(RecyclerView.OnScrollListener listener)
listener - listener to set or null to clearpublic FastAdapterDialog<Item> withPositiveButton(java.lang.String text, OnClickListener listener)
text - The text to display in the positive buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withPositiveButton(int textRes, OnClickListener listener)
textRes - The resource id of the text to display in the positive buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNegativeButton(java.lang.String text, OnClickListener listener)
text - The text to display in the negative buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNegativeButton(int textRes, OnClickListener listener)
textRes - The resource id of the text to display in the negative buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNegativeButton(int textRes)
textRes - The resource id of the text to display in the negative buttonpublic FastAdapterDialog<Item> withNegativeButton(java.lang.String text)
text - The text to display in the negative buttonpublic FastAdapterDialog<Item> withNeutralButton(java.lang.String text, OnClickListener listener)
text - The text to display in the neutral buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNeutralButton(int textRes, OnClickListener listener)
textRes - The resource id of the text to display in the neutral buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withButton(int whichButton, java.lang.String text, OnClickListener listener)
show().whichButton - Which button to set the listener on, can be one of
DialogInterface.BUTTON_POSITIVE,
DialogInterface.BUTTON_NEGATIVE, or
DialogInterface.BUTTON_NEUTRALtext - The text to display in positive button.listener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withButton(int whichButton, int textRes, OnClickListener listener)
show().whichButton - Which button to set the listener on, can be one of
DialogInterface.BUTTON_POSITIVE,
DialogInterface.BUTTON_NEGATIVE, or
DialogInterface.BUTTON_NEUTRALtextRes - The text to display in positive button.listener - The DialogInterface.OnClickListener to use.public void show()
#onStart.public RecyclerView getRecyclerView()
public FastAdapterDialog<Item> withOnClickListener(<any> onClickListener)
onClickListener - the OnClickListener which will be used for a single itempublic FastAdapterDialog<Item> withOnPreClickListener(<any> onPreClickListener)
onPreClickListener - the OnPreClickListener which will be called after a single item was clicked and all internal methods are donepublic FastAdapterDialog<Item> withOnLongClickListener(<any> onLongClickListener)
onLongClickListener - the OnLongClickListener which will be used for a single itempublic FastAdapterDialog<Item> withOnPreLongClickListener(<any> onPreLongClickListener)
onPreLongClickListener - the OnLongClickListener which will be called after a single item was clicked and all internal methods are donepublic FastAdapterDialog<Item> withOnTouchListener(<any> onTouchListener)
onTouchListener - the TouchListener which will be used for a single itempublic FastAdapterDialog<Item> set(java.util.List<Item> items)
items - the new items to setpublic FastAdapterDialog<Item> setNewList(java.util.List<Item> items)
items - the new items to set@SafeVarargs public final FastAdapterDialog<Item> add(Item... items)
items - the items to addpublic FastAdapterDialog<Item> add(java.util.List<Item> items)
items - the items to add@SafeVarargs public final FastAdapterDialog<Item> add(int position, Item... items)
position - the global positionitems - the items to addpublic FastAdapterDialog<Item> add(int position, java.util.List<Item> items)
position - the global positionitems - the items to addpublic FastAdapterDialog<Item> set(int position, Item item)
position - the global positionitem - the item to setpublic FastAdapterDialog<Item> add(Item item)
item - the item to addpublic FastAdapterDialog<Item> add(int position, Item item)
position - the global positionitem - the item to addpublic FastAdapterDialog<Item> move(int fromPosition, int toPosition)
fromPosition - the position global from which we want to movetoPosition - the global position to which to movepublic FastAdapterDialog<Item> remove(int position)
position - the global positionpublic FastAdapterDialog<Item> removeItemRange(int position, int itemCount)
position - the global positionitemCount - the count of items removedpublic FastAdapterDialog<Item> clear()