Class CombineMessagePreviewFragment
-
- All Implemented Interfaces:
-
ai.nexconn.chatui.base.BasePage,ai.nexconn.chatui.widget.adapter.IViewProviderListener,android.content.ComponentCallbacks,android.view.View.OnCreateContextMenuListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
public class CombineMessagePreviewFragment extends BaseViewModelFragment<VM> implements IViewProviderListener<T>
Combined-forward message preview Fragment.
Uses MessageListAdapter to render the message list, reusing all existing message ItemProviders. Supports UI display of all message types including text, image/GIF, voice, video, file, etc.
-
-
Constructor Summary
Constructors Constructor Description CombineMessagePreviewFragment()
-
Method Summary
Modifier and Type Method Description CombineMessagePreviewViewModelonCreateViewModel(@NonNull() Bundle bundle)Creates the ViewModel. ViewonCreateView(@NonNull() Context context, @NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle args)Called after the module is created to build the view for use in a Fragment or Activity. voidonViewReady(@NonNull() CombineMessagePreviewViewModel viewModel)Called after the View is created. voidonViewClick(int clickType, UiMessage data)booleanonViewLongClick(View view, int clickType, UiMessage data)booleanonViewLongClick(int clickType, UiMessage data)voidonStop()voidonDestroyView()-
Methods inherited from class ai.nexconn.chatui.base.BaseViewModelFragment
getViewModel, onBeforeViewReady, onCreate, onCreateView -
Methods inherited from class ai.nexconn.chatui.base.BaseFragment
finishActivity, isFragmentAlive, onBackPressed, onDestroy, sendFinishActivityBroadcast -
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onViewCreated, onViewStateRestored, postponeEnterTransition, 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, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu -
Methods inherited from class androidx.lifecycle.HasDefaultViewModelProviderFactory
getDefaultViewModelCreationExtras -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
onCreateViewModel
@NonNull() CombineMessagePreviewViewModel onCreateViewModel(@NonNull() Bundle bundle)
Creates the ViewModel.
- Parameters:
bundle- Bundle- Returns:
the ViewModel instance
-
onCreateView
@NonNull() View onCreateView(@NonNull() Context context, @NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle args)
Called after the module is created to build the view for use in a Fragment or Activity.
- Parameters:
context- contextinflater- the LayoutInflater used to inflate views in the modulecontainer- the parent ViewGroupargs- optional arguments provided when instantiating the module- Returns:
the created UI view
-
onViewReady
void onViewReady(@NonNull() CombineMessagePreviewViewModel viewModel)
Called after the View is created.
- Parameters:
viewModel- VM
-
onViewClick
void onViewClick(int clickType, UiMessage data)
- Parameters:
clickType- identifier to distinguish click eventsdata- the data source
-
onViewLongClick
boolean onViewLongClick(View view, int clickType, UiMessage data)
- Parameters:
view- the view that triggered the long pressclickType- identifier to distinguish click eventsdata- the data source
-
onViewLongClick
boolean onViewLongClick(int clickType, UiMessage data)
- Parameters:
clickType- identifier to distinguish click eventsdata- the data source
-
onStop
void onStop()
-
onDestroyView
void onDestroyView()
-
-
-
-