Package com.aliucord.fragments
Class SelectDialog
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.content.DialogInterface.OnCancelListener
,android.content.DialogInterface.OnDismissListener
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,com.discord.app.AppComponent
public final class SelectDialog extends AppDialog
Creates a dialog similar to the language picker, allows you to supply a list of options for a user to select from.
-
-
Field Summary
Fields Modifier and Type Field Description private Function1<Integer, Unit>
onResultListener
private Array<String>
items
private String
title
private final Boolean
isRecreated
private final Subject<Void, Void>
unsubscribeSignal
-
Constructor Summary
Constructors Constructor Description SelectDialog()
-
Method Summary
Modifier and Type Method Description final Function1<Integer, Unit>
getOnResultListener()
final Unit
setOnResultListener(Function1<Integer, Unit> onResultListener)
final Array<String>
getItems()
final Unit
setItems(Array<String> items)
final String
getTitle()
final Unit
setTitle(String title)
Unit
onViewBound(View view)
-
Methods inherited from class com.discord.app.AppDialog
dismiss, getAppActivity, getArgumentsOrDefault, getUnsubscribeSignal, hideKeyboard, hideKeyboard, isRecreated, onCreateDialog, onDestroyView, onPause, onResume, onStart, onViewBoundOrOnResume, onViewCreated, setOnClickAndDismissListener, show, show, showKeyboard
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, 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, hasOptionsMenu, hashCode, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, 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
-
Methods inherited from class androidx.fragment.app.DialogFragment
dismissAllowingStateLoss, getDialog, getShowsDialog, getTheme, isCancelable, onAttach, onCancel, onCreate, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, showNow
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getOnResultListener
final Function1<Integer, Unit> getOnResultListener()
Called when an item is selected
-
setOnResultListener
final Unit setOnResultListener(Function1<Integer, Unit> onResultListener)
Called when an item is selected
-
onViewBound
Unit onViewBound(View view)
-
-
-
-