public class FastAdapterDialog<Item extends com.mikepenz.fastadapter.IItem>
extends android.support.v7.app.AlertDialog
android.support.v7.app.AlertDialog.Builderandroid.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener| 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
|
android.support.v7.widget.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(com.mikepenz.fastadapter.FastAdapter<Item> adapter) |
FastAdapterDialog<Item> |
withButton(int whichButton,
int textRes,
android.content.DialogInterface.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,
android.content.DialogInterface.OnClickListener listener)
Sets a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withFastItemAdapter(com.mikepenz.fastadapter.FastAdapter<Item> fastAdapter,
com.mikepenz.fastadapter.adapters.ItemAdapter<Item> itemAdapter) |
FastAdapterDialog<Item> |
withItems(Item... items) |
FastAdapterDialog<Item> |
withItems(java.util.List<Item> items) |
FastAdapterDialog<Item> |
withLayoutManager(android.support.v7.widget.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,
android.content.DialogInterface.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,
android.content.DialogInterface.OnClickListener listener)
Set a listener to be invoked when the negative button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withNeutralButton(int textRes,
android.content.DialogInterface.OnClickListener listener)
Set a listener to be invoked when the neutral button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withNeutralButton(java.lang.String text,
android.content.DialogInterface.OnClickListener listener)
Set a listener to be invoked when the neutral button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withOnClickListener(com.mikepenz.fastadapter.listeners.OnClickListener<Item> onClickListener)
Define the OnClickListener which will be used for a single item
|
FastAdapterDialog<Item> |
withOnLongClickListener(com.mikepenz.fastadapter.listeners.OnLongClickListener<Item> onLongClickListener)
Define the OnLongClickListener which will be used for a single item
|
FastAdapterDialog<Item> |
withOnPreClickListener(com.mikepenz.fastadapter.listeners.OnClickListener<Item> onPreClickListener)
Define the OnPreClickListener which will be used for a single item and is called after all internal methods are done
|
FastAdapterDialog<Item> |
withOnPreLongClickListener(com.mikepenz.fastadapter.listeners.OnLongClickListener<Item> onPreLongClickListener)
Define the OnLongClickListener which will be used for a single item and is called after all internal methods are done
|
FastAdapterDialog<Item> |
withOnScrollListener(android.support.v7.widget.RecyclerView.OnScrollListener listener)
Add a listener that will be notified of any changes in scroll state or position of the
RecyclerView.
|
FastAdapterDialog<Item> |
withOnTouchListener(com.mikepenz.fastadapter.listeners.OnTouchListener<Item> onTouchListener)
Define the TouchListener which will be used for a single item
|
FastAdapterDialog<Item> |
withPositiveButton(int textRes,
android.content.DialogInterface.OnClickListener listener)
Set a listener to be invoked when the positive button of the dialog is pressed.
|
FastAdapterDialog<Item> |
withPositiveButton(java.lang.String text,
android.content.DialogInterface.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.
|
getButton, getListView, onCreate, onKeyDown, onKeyUp, setButton, setButton, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setTitle, setView, setViewaddContentView, findViewById, getDelegate, getSupportActionBar, invalidateOptionsMenu, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onWindowStartingSupportActionMode, setContentView, setContentView, setContentView, setTitle, supportRequestWindowFeaturecancel, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setVolumeControlStream, takeKeyEvents, unregisterForContextMenupublic 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(@StringRes int titleRes)
titleRes - The resource id of the text to display in the title.public FastAdapterDialog<Item> withFastItemAdapter(@NonNull com.mikepenz.fastadapter.FastAdapter<Item> fastAdapter, @NonNull com.mikepenz.fastadapter.adapters.ItemAdapter<Item> itemAdapter)
public FastAdapterDialog<Item> withItems(@NonNull java.util.List<Item> items)
public FastAdapterDialog<Item> withItems(@NonNull Item... items)
public FastAdapterDialog<Item> withAdapter(com.mikepenz.fastadapter.FastAdapter<Item> adapter)
public FastAdapterDialog<Item> withLayoutManager(android.support.v7.widget.RecyclerView.LayoutManager layoutManager)
RecyclerView.LayoutManager that the RecyclerView will use.layoutManager - LayoutManager to usepublic FastAdapterDialog<Item> withOnScrollListener(android.support.v7.widget.RecyclerView.OnScrollListener listener)
listener - listener to set or null to clearpublic FastAdapterDialog<Item> withPositiveButton(java.lang.String text, android.content.DialogInterface.OnClickListener listener)
text - The text to display in the positive buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withPositiveButton(@StringRes int textRes, android.content.DialogInterface.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, android.content.DialogInterface.OnClickListener listener)
text - The text to display in the negative buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNegativeButton(@StringRes int textRes, android.content.DialogInterface.OnClickListener listener)
textRes - The resource id of the text to display in the negative buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNegativeButton(@StringRes 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, android.content.DialogInterface.OnClickListener listener)
text - The text to display in the neutral buttonlistener - The DialogInterface.OnClickListener to use.public FastAdapterDialog<Item> withNeutralButton(@StringRes int textRes, android.content.DialogInterface.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, android.content.DialogInterface.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, @StringRes int textRes, android.content.DialogInterface.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()
Dialog.onStart().show in class android.app.Dialog@NonNull public android.support.v7.widget.RecyclerView getRecyclerView()
public FastAdapterDialog<Item> withOnClickListener(com.mikepenz.fastadapter.listeners.OnClickListener<Item> onClickListener)
onClickListener - the OnClickListener which will be used for a single itempublic FastAdapterDialog<Item> withOnPreClickListener(com.mikepenz.fastadapter.listeners.OnClickListener<Item> onPreClickListener)
onPreClickListener - the OnPreClickListener which will be called after a single item was clicked and all internal methods are donepublic FastAdapterDialog<Item> withOnLongClickListener(com.mikepenz.fastadapter.listeners.OnLongClickListener<Item> onLongClickListener)
onLongClickListener - the OnLongClickListener which will be used for a single itempublic FastAdapterDialog<Item> withOnPreLongClickListener(com.mikepenz.fastadapter.listeners.OnLongClickListener<Item> onPreLongClickListener)
onPreLongClickListener - the OnLongClickListener which will be called after a single item was clicked and all internal methods are donepublic FastAdapterDialog<Item> withOnTouchListener(com.mikepenz.fastadapter.listeners.OnTouchListener<Item> 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()