Class AngularNativeWebBottomSheetFragment
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,androidx.activity.contextaware.ContextAware,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,io.github.angularwave.android.core.bridge.BridgeDestination,io.github.angularwave.android.navigation.destinations.AngularNativeDestination,io.github.angularwave.android.navigation.destinations.AngularNativeDialogDestination,io.github.angularwave.android.navigation.fragments.AngularNativeWebFragmentCallback
@AngularNativeDestinationDeepLink(uri = "angularNative://fragment/web/modal/sheet") public class AngularNativeWebBottomSheetFragment extends AngularNativeBottomSheetFragment implements AngularNativeWebFragmentCallback
The base class from which all bottom sheet web fragments in a AngularNative app should extend from.
For native bottom sheet fragments, refer to AngularNativeBottomSheetFragment.
-
-
Field Summary
Fields Modifier and Type Field Description private final AngularNativeViewangularNativeViewprivate final Navigatornavigatorpublic final StringmPreviousWhoprivate final Lifecyclelifecycleprivate final ViewModelStoreviewModelStoreprivate final ViewModelProvider.FactorydefaultViewModelProviderFactoryprivate final CreationExtrasdefaultViewModelCreationExtrasprivate final SavedStateRegistrysavedStateRegistryprivate final Fragmentfragmentprivate final Stringlocationprivate final HashMap<String, Object>pathPropertiesprivate final AngularNativeFragmentViewModelfragmentViewModelprivate final BooleanisActiveprivate final BooleanisModal
-
Constructor Summary
Constructors Constructor Description AngularNativeWebBottomSheetFragment()
-
Method Summary
Modifier and Type Method Description final AngularNativeViewgetAngularNativeView()Gets the AngularNativeView instance in the Fragment's view with resource ID R.id.angular_native_view. UnitonCreate(Bundle savedInstanceState)ViewonCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)UnitonViewCreated(View view, Bundle savedInstanceState)UnitonDestroyView()ActivityResultLauncher<Intent>activityResultLauncher(Integer requestCode)Gets a registered ActivityResultContracts.StartActivityForResultactivity result launcher instance for the givenrequestCode.ActivityResultLauncher<String>activityPermissionResultLauncher(Integer requestCode)Gets a registered ActivityResultContracts.RequestPermissionactivity result launcher instance for the givenrequestCode.BooleanlaunchNativeActivity(Intent intent, Function2<Integer, Intent, Unit> result)Launches an activity result owned by this destination's native bridge. BooleanlaunchNativePermission(String permission, Function1<Boolean, Unit> result)Requests one runtime permission owned by this destination's native bridge. UnitcancelNativeActivity()Clears a pending native activity callback when its bridge request ends. UnitcancelNativePermission()Clears a pending native permission callback when its bridge request ends. UnitonBridgeComponentInitialized(BridgeComponent<?> component)UnitonStart()UnitonCancel(DialogInterface dialog)UnitonDismiss(DialogInterface dialog)Unitrefresh(Boolean displayProgress)Refresh the destination's contents. final UnitprepareNavigation(Function0<Unit> onReady)UnitonColdBootPageStarted(String location)Called when WebNavigation begins a WebView cold boot (fresh resources). UnitonColdBootPageCompleted(String location)Called when WebNavigation completes a WebView cold boot (fresh resources). UnitonWebViewAttached(AngularNativeWebView webView)Called when the WebView has been attached to the current destination. UnitonWebViewDetached(AngularNativeWebView webView)Called when the WebView has been detached from the current destination. ViewcreateProgressView(String location)z Inflate and return a new view to serve as a progress view. ViewcreateErrorView(VisitError error)Inflate and return a new view to serve as an error view. AngularNativeWebChromeClientcreateWebChromeClient()Create and return a new web chrome client instance. UnitonVisitErrorReceived(String location, VisitError error)Called when a WebNavigation visit resulted in an error. -
Methods inherited from class io.github.angularwave.android.navigation.fragments.AngularNativeBottomSheetFragment
closeDialog, delegate, getNavigator, onActivityCreated, onActivityResult, onBeforeNavigation, onStop, toolbarForNavigation -
Methods inherited from class androidx.fragment.app.Fragment
addOnContextAvailableListener, dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, 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, hasOptionsMenu, hashCode, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, peekAvailableContext, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, removeOnContextAvailableListener, 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 io.github.angularwave.android.navigation.destinations.AngularNativeDestination
bridgeWebViewIsReady, customNavigationOptions, customNavigatorForNavigation, customRouteDecision, getFragment, getFragmentViewModel, getLocation, getPathProperties, isActive, isModal, shouldObserveTitleChanges -
Methods inherited from class io.github.angularwave.android.navigation.fragments.AngularNativeWebFragmentCallback
onFormSubmissionFinished, onFormSubmissionStarted, onReceivedHttpAuthRequest, onVisitCompleted, onVisitErrorReceivedWithCachedSnapshotAvailable, onVisitRendered, onVisitRequestFinished, onVisitStarted -
Methods inherited from class androidx.fragment.app.DialogFragment
dismissNow, getDialog, getShowsDialog, getTheme, isCancelable, onAttach, onDetach, onGetLayoutInflater, onSaveInstanceState, onViewStateRestored, requireComponentDialog, requireDialog, setCancelable, setShowsDialog, setStyle, show, show, showNow -
Methods inherited from class com.google.android.material.bottomsheet.BottomSheetDialogFragment
dismiss, dismissAllowingStateLoss, onCreateDialog -
Methods inherited from class androidx.appcompat.app.AppCompatDialogFragment
setupDialog -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getAngularNativeView
final AngularNativeView getAngularNativeView()
Gets the AngularNativeView instance in the Fragment's view with resource ID R.id.angular_native_view.
-
onCreateView
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onViewCreated
Unit onViewCreated(View view, Bundle savedInstanceState)
-
onDestroyView
Unit onDestroyView()
-
activityResultLauncher
ActivityResultLauncher<Intent> activityResultLauncher(Integer requestCode)
Gets a registered
ActivityResultContracts.StartActivityForResultactivity result launcher instance for the givenrequestCode.Override to provide your own androidx.activity.result.ActivityResultLauncher instances. If your app doesn't have a matching
requestCode, you must callsuper.activityResultLauncher(requestCode)to give the library an opportunity to provide a matching result launcher.- Parameters:
requestCode- The request code for the corresponding result launcher.
-
activityPermissionResultLauncher
ActivityResultLauncher<String> activityPermissionResultLauncher(Integer requestCode)
Gets a registered
ActivityResultContracts.RequestPermissionactivity result launcher instance for the givenrequestCode.Override to provide your own androidx.activity.result.ActivityResultLauncher instances. If your app doesn't have a matching
requestCode, you must callsuper.activityPermissionResultLauncher(requestCode)to give the library an opportunity to provide a matching result launcher.- Parameters:
requestCode- The request code for the corresponding result launcher.
-
launchNativeActivity
Boolean launchNativeActivity(Intent intent, Function2<Integer, Intent, Unit> result)
Launches an activity result owned by this destination's native bridge.
-
launchNativePermission
Boolean launchNativePermission(String permission, Function1<Boolean, Unit> result)
Requests one runtime permission owned by this destination's native bridge.
-
cancelNativeActivity
Unit cancelNativeActivity()
Clears a pending native activity callback when its bridge request ends.
-
cancelNativePermission
Unit cancelNativePermission()
Clears a pending native permission callback when its bridge request ends.
-
onBridgeComponentInitialized
Unit onBridgeComponentInitialized(BridgeComponent<?> component)
-
onCancel
Unit onCancel(DialogInterface dialog)
-
onDismiss
Unit onDismiss(DialogInterface dialog)
-
refresh
Unit refresh(Boolean displayProgress)
Refresh the destination's contents.
- Parameters:
displayProgress- Whether progress should be displayed while refreshing.
-
prepareNavigation
final Unit prepareNavigation(Function0<Unit> onReady)
-
onColdBootPageStarted
Unit onColdBootPageStarted(String location)
Called when WebNavigation begins a WebView cold boot (fresh resources).
-
onColdBootPageCompleted
Unit onColdBootPageCompleted(String location)
Called when WebNavigation completes a WebView cold boot (fresh resources).
-
onWebViewAttached
Unit onWebViewAttached(AngularNativeWebView webView)
Called when the WebView has been attached to the current destination.
-
onWebViewDetached
Unit onWebViewDetached(AngularNativeWebView webView)
Called when the WebView has been detached from the current destination.
-
createProgressView
View createProgressView(String location)
z Inflate and return a new view to serve as a progress view.
-
createErrorView
View createErrorView(VisitError error)
Inflate and return a new view to serve as an error view.
-
createWebChromeClient
AngularNativeWebChromeClient createWebChromeClient()
Create and return a new web chrome client instance.
-
onVisitErrorReceived
Unit onVisitErrorReceived(String location, VisitError error)
Called when a WebNavigation visit resulted in an error.
-
-
-
-