Package com.cheetahdigital.uikit.widget
Class CountryDialog
- java.lang.Object
 - 
- androidx.fragment.app.Fragment
 - 
- androidx.fragment.app.DialogFragment
 - 
- com.cheetahdigital.uikit.widget.CountryDialog
 
 
 
 
- 
- All Implemented Interfaces:
 android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
public class CountryDialog extends androidx.fragment.app.DialogFragment 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCountryDialog.Countrystatic interfaceCountryDialog.CountryListenerCallback used when country is clicked. 
- 
Field Summary
Fields Modifier and Type Field Description java.lang.StringTAG 
- 
Constructor Summary
Constructors Constructor Description CountryDialog() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CountryDialog.Country>getCountryList()java.lang.StringgetCountryNameFromCode(java.lang.String countryCode)voidonAttach(android.content.Context context)voidonAttachFragment(androidx.fragment.app.Fragment childFragment)voidonCreate(android.os.Bundle savedInstanceState)android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)voidonDismiss(android.content.DialogInterface dialog)voidonViewCreated(android.view.View view, android.os.Bundle savedInstanceState)voidsetCountryList(java.util.List<CountryDialog.Country> countryList)Set a custom country list to be populated upon creating the dialogvoidsetCountryListener(CountryDialog.CountryListener listener)Set a listener to handle country click event- 
Methods inherited from class androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onCancel, onCreateDialog, onDestroyView, onDetach, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, show, showNow 
- 
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, 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, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, 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 
 - 
 
 - 
 
- 
- 
Method Detail
- 
onCreate
public void onCreate(@Nullable android.os.Bundle savedInstanceState)- Overrides:
 onCreatein classandroidx.fragment.app.DialogFragment
 
- 
onCreateView
@Nullable public android.view.View onCreateView(@NonNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)- Overrides:
 onCreateViewin classandroidx.fragment.app.Fragment
 
- 
onViewCreated
public void onViewCreated(@NonNull android.view.View view, @Nullable android.os.Bundle savedInstanceState)- Overrides:
 onViewCreatedin classandroidx.fragment.app.Fragment
 
- 
getCountryList
public java.util.List<CountryDialog.Country> getCountryList()
- Returns:
 - the list of countries.
 
 
- 
onAttach
public void onAttach(@NonNull android.content.Context context)- Overrides:
 onAttachin classandroidx.fragment.app.DialogFragment
 
- 
onAttachFragment
public void onAttachFragment(@NonNull androidx.fragment.app.Fragment childFragment)- Overrides:
 onAttachFragmentin classandroidx.fragment.app.Fragment
 
- 
getCountryNameFromCode
public java.lang.String getCountryNameFromCode(java.lang.String countryCode)
- Parameters:
 countryCode- country code used to search in the list- Returns:
 - country name matching the country code
 
 
- 
setCountryList
public void setCountryList(java.util.List<CountryDialog.Country> countryList)
Set a custom country list to be populated upon creating the dialog- Parameters:
 countryList- list of country to be used/displayed in the list
 
- 
setCountryListener
public void setCountryListener(CountryDialog.CountryListener listener)
Set a listener to handle country click event- Parameters:
 listener- listener for handling country click
 
- 
onDismiss
public void onDismiss(@NonNull android.content.DialogInterface dialog)- Specified by:
 onDismissin interfaceandroid.content.DialogInterface.OnDismissListener- Overrides:
 onDismissin classandroidx.fragment.app.DialogFragment
 
 - 
 
 -