Package eltos.simpledialogfragment.list
Klasse SimpleListDialog
java.lang.Object
androidx.fragment.app.Fragment
androidx.fragment.app.DialogFragment
eltos.simpledialogfragment.SimpleDialog<SimpleListDialog>
eltos.simpledialogfragment.CustomViewDialog<SimpleListDialog>
eltos.simpledialogfragment.list.CustomListDialog<SimpleListDialog>
eltos.simpledialogfragment.list.SimpleListDialog
- Alle implementierten Schnittstellen:
android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,android.widget.AdapterView.OnItemClickListener,android.widget.AdapterView.OnItemLongClickListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
A dialog that displays a filterable list in single- or multi-choice mode.
Created by eltos on 02.01.2017.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen eltos.simpledialogfragment.SimpleDialog
SimpleDialog.OnDialogResultListenerVon Klasse geerbte verschachtelte Klassen/Schnittstellen androidx.fragment.app.Fragment
androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected static final Stringprotected static final Stringprotected static final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final StringVon Klasse geerbte Felder eltos.simpledialogfragment.list.CustomListDialog
CHOICE_MAX_COUNT, CHOICE_MIN_COUNT, CHOICE_MODE, INITIALLY_CHECKED_IDS, INITIALLY_CHECKED_POSITIONS, mAdapter, mFilterEditText, mListView, MULTI_CHOICE, NO_CHOICE, SELECTED_IDS, SELECTED_POSITIONS, SELECTED_SINGLE_ID, SELECTED_SINGLE_POSITION, SINGLE_CHOICE, SINGLE_CHOICE_DIRECTVon Klasse geerbte Felder eltos.simpledialogfragment.SimpleDialog
BUNDLE, CANCELABLE, FULLSCREEN, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLEVon Klasse geerbte Felder androidx.fragment.app.DialogFragment
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMALVon Klasse geerbte Felder androidx.fragment.app.Fragment
mPreviousWho -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic SimpleListDialogbuild()filterable(boolean enabled, boolean highlight) If set to true, show an input field at the to of the list and allow the user to filter the listitems(android.content.Context context, int labelArrayResourceIds) Populate the list using a string array resource iditems(android.content.Context context, int[] labelsResourceIds) Populate the list with the labels providedPopulate the list with the labels providedPopulate the list with the labels provided The corresponding ids can be used to identify which labels were selecteditems(ArrayList<SimpleListItem> items) Populate the list with the Items provided.layout(int layout) Set the item layout to use for the list, one ofLAYOUT_AUTO,LAYOUT_PLAIN,LAYOUT_SINGLE_CHOICE,LAYOUT_MULTI_CHOICE,LAYOUT_ACTIONor a custom layout resource.protected eltos.simpledialogfragment.list.SimpleListDialog.SimpleListAdapterOverwrite this method to provide a custom adapterprotected android.os.BundleonResult(int which) Overwrite this method to provide additional results from your custom view to be passed to theSimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)Von Klasse geerbte Methoden eltos.simpledialogfragment.list.CustomListDialog
choiceIdPreset, choiceIdPreset, choiceIdPreset, choiceMax, choiceMin, choiceMode, choicePreset, choicePreset, choicePreset, divider, emptyText, emptyText, filterable, getListView, grid, gridColumnWidth, gridNumColumn, notifyDataSetChanged, onCreateContentView, onDialogShown, onItemClick, onItemLongClick, onSaveInstanceState, pos, pos, updatePosButtonVon Klasse geerbte Methoden eltos.simpledialogfragment.CustomViewDialog
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, onNegativeButtonClick, onNeutralButtonClick, onPositiveButtonClick, pressPositiveButton, setNegativeButtonEnabled, setNeutralButtonEnabled, setPositiveButtonEnabledVon Klasse geerbte Methoden eltos.simpledialogfragment.SimpleDialog
cancelable, extra, fullscreen, fullscreen, getArgs, getArgString, getContext, getExtras, getMessage, getTitle, icon, isCancelable, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, setArg, setArg, setArg, setArg, setButtonClickListener, setButtonEnabled, show, show, show, show, show, show, show, show, showKeyboard, theme, title, titleVon Klasse geerbte Methoden androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, dismissNow, getDialog, getShowsDialog, getTheme, onActivityCreated, onAttach, onDetach, onDismiss, onGetLayoutInflater, onStart, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, showNowVon Klasse geerbte Methoden androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewCreated, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
Felddetails
-
TAG
- Siehe auch:
-
SELECTED_LABELS
- Siehe auch:
-
SELECTED_SINGLE_LABEL
- Siehe auch:
-
LAYOUT_AUTO
@LayoutRes public static final int LAYOUT_AUTO- Siehe auch:
-
LAYOUT_PLAIN
@LayoutRes public static final int LAYOUT_PLAIN -
LAYOUT_SINGLE_CHOICE
@LayoutRes public static final int LAYOUT_SINGLE_CHOICE -
LAYOUT_MULTI_CHOICE
@LayoutRes public static final int LAYOUT_MULTI_CHOICE -
LAYOUT_ACTION
@LayoutRes public static final int LAYOUT_ACTION -
DATA_SET
- Siehe auch:
-
HIGHLIGHT
- Siehe auch:
-
LAYOUT
- Siehe auch:
-
-
Konstruktordetails
-
SimpleListDialog
public SimpleListDialog()
-
-
Methodendetails
-
build
-
items
Populate the list with the labels provided- Parameter:
context- a context for resolving the string ids (cannot use getContext() here)labelsResourceIds- a list of android string resource identifiers- Gibt zurück:
- this instance
-
items
Populate the list using a string array resource id- Parameter:
context- a context for resolving the resource id (cannot use getContext() here)labelArrayResourceIds- an android string array resource identifier- Gibt zurück:
- this instance
-
items
Populate the list with the labels provided- Parameter:
labels- a list of string to be displayed- Gibt zurück:
- this instance
-
items
Populate the list with the labels provided The corresponding ids can be used to identify which labels were selected- Parameter:
labels- a list of string to be displayedids- a list of ids corresponding to the strings- Gibt zurück:
- this instance
- Löst aus:
IllegalArgumentException- if the arrays length don't match
-
items
Populate the list with the Items provided. SeeSimpleListItemfor further details- Parameter:
items- a list ofSimpleListItem- Gibt zurück:
- this instance
-
filterable
If set to true, show an input field at the to of the list and allow the user to filter the list- Parameter:
enabled- whether to allow filtering or nothighlight- whether to highlight the text filtered- Gibt zurück:
- this instance
-
layout
Set the item layout to use for the list, one ofLAYOUT_AUTO,LAYOUT_PLAIN,LAYOUT_SINGLE_CHOICE,LAYOUT_MULTI_CHOICE,LAYOUT_ACTIONor a custom layout resource.When using
LAYOUT_AUTO(which is the default), an appropriate item layout will be chosen based on theCustomListDialog.choiceMode(int)andCustomListDialog.choicePreset(java.util.List<java.lang.Integer>)orCustomListDialog.choiceIdPreset(java.util.List<java.lang.Long>)settingWhen using a custom layout resource, a
TextViewwith idR.id.text1is required.- Parameter:
layout- the layout to use for each item- Gibt zurück:
- this instance
-
onCreateAdapter
protected eltos.simpledialogfragment.list.SimpleListDialog.SimpleListAdapter onCreateAdapter()Beschreibung aus Klasse kopiert:CustomListDialogOverwrite this method to provide a custom adapter- Angegeben von:
onCreateAdapterin KlasseCustomListDialog<SimpleListDialog>- Gibt zurück:
- the ListAdapter to use
-
onResult
protected android.os.Bundle onResult(int which) Beschreibung aus Klasse kopiert:CustomViewDialogOverwrite this method to provide additional results from your custom view to be passed to theSimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)- Setzt außer Kraft:
onResultin KlasseCustomListDialog<SimpleListDialog>- Parameter:
which- seeSimpleDialog.OnDialogResultListener- Gibt zurück:
- the bundle to merge with the results or null
-