Package ai.nexconn.chatui.picture
Class PicturePreviewActivity
-
- All Implemented Interfaces:
-
ai.nexconn.chatui.picture.adapter.ViewPagerAdapter.OnCallBackActivity,android.content.ComponentCallbacks,android.content.ComponentCallbacks2,android.view.KeyEvent.Callback,android.view.LayoutInflater.Factory,android.view.LayoutInflater.Factory2,android.view.View.OnClickListener,android.view.View.OnCreateContextMenuListener,android.view.Window.Callback,androidx.activity.OnBackPressedDispatcherOwner,androidx.activity.contextaware.ContextAware,androidx.activity.result.ActivityResultCaller,androidx.activity.result.ActivityResultRegistryOwner,androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider,androidx.appcompat.app.AppCompatCallback,androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback,androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator,androidx.core.app.OnMultiWindowModeChangedProvider,androidx.core.app.OnNewIntentProvider,androidx.core.app.OnPictureInPictureModeChangedProvider,androidx.core.app.TaskStackBuilder.SupportParentable,androidx.core.content.OnConfigurationChangedProvider,androidx.core.content.OnTrimMemoryProvider,androidx.core.view.KeyEventDispatcher.Component,androidx.core.view.MenuHost,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
public class PicturePreviewActivity extends PictureBaseActivity implements View.OnClickListener, ViewPagerAdapter.OnCallBackActivity
-
-
Field Summary
Fields Modifier and Type Field Description protected ImageViewpicture_left_backprotected TextViewmTvPictureOkprotected ViewPager2viewPagerprotected intpositionprotected booleanis_bottom_previewprotected List<LocalMedia>imagesprotected List<LocalMedia>selectImagesprotected TextViewcheckprotected ViewPagerAdapteradapterprotected Animationanimationprotected ViewbtnCheckprotected booleanrefreshprotected intindexprotected intscreenWidthprotected HandlermHandlerprotected FrameLayoutselectBarLayoutprotected FrameLayouttopLayoutprotected CheckBoxmCbOriginalprotected PictureSelectionConfigconfigprotected booleanopenWhiteStatusBarprotected booleannumCompleteprotected intcolorPrimaryprotected intcolorPrimaryDarkprotected StringcameraPathprotected StringoriginalPathprotected PictureLoadingDialogdialogprotected List<LocalMedia>selectionMediasprotected HandlermHandlerprotected Viewcontainerpublic final static intDEFAULT_KEYS_DIALERpublic final static intDEFAULT_KEYS_DISABLEpublic final static intDEFAULT_KEYS_SEARCH_GLOBALpublic final static intDEFAULT_KEYS_SEARCH_LOCALpublic final static intDEFAULT_KEYS_SHORTCUTprotected final static Array<int>FOCUSED_STATE_SETpublic final static intFULLSCREEN_MODE_REQUEST_ENTERpublic final static intFULLSCREEN_MODE_REQUEST_EXITpublic final static intOVERRIDE_TRANSITION_CLOSEpublic final static intOVERRIDE_TRANSITION_OPENpublic final static intRESULT_CANCELEDpublic final static intRESULT_FIRST_USERpublic final static intRESULT_OKpublic final static intTRIM_MEMORY_BACKGROUNDpublic final static intTRIM_MEMORY_COMPLETEpublic final static intTRIM_MEMORY_MODERATEpublic final static intTRIM_MEMORY_RUNNING_CRITICALpublic final static intTRIM_MEMORY_RUNNING_LOWpublic final static intTRIM_MEMORY_RUNNING_MODERATEpublic final static intTRIM_MEMORY_UI_HIDDENpublic final static StringACCESSIBILITY_SERVICEpublic final static StringACCOUNT_SERVICEpublic final static StringACTIVITY_SERVICEpublic final static StringADVANCED_PROTECTION_SERVICEpublic final static StringALARM_SERVICEpublic final static StringAPPWIDGET_SERVICEpublic final static StringAPP_FUNCTION_SERVICEpublic final static StringAPP_OPS_SERVICEpublic final static StringAPP_SEARCH_SERVICEpublic final static StringAUDIO_SERVICEpublic final static StringBATTERY_SERVICEpublic final static intBIND_ABOVE_CLIENTpublic final static intBIND_ADJUST_WITH_ACTIVITYpublic final static intBIND_ALLOW_ACTIVITY_STARTSpublic final static intBIND_ALLOW_OOM_MANAGEMENTpublic final static intBIND_AUTO_CREATEpublic final static intBIND_DEBUG_UNBINDpublic final static intBIND_EXTERNAL_SERVICEpublic final static longBIND_EXTERNAL_SERVICE_LONGpublic final static intBIND_IMPORTANTpublic final static intBIND_INCLUDE_CAPABILITIESpublic final static intBIND_NOT_FOREGROUNDpublic final static intBIND_NOT_PERCEPTIBLEpublic final static intBIND_PACKAGE_ISOLATED_PROCESSpublic final static intBIND_SHARED_ISOLATED_PROCESSpublic final static intBIND_WAIVE_PRIORITYpublic final static StringBIOMETRIC_SERVICEpublic final static StringBLOB_STORE_SERVICEpublic final static StringBLUETOOTH_SERVICEpublic final static StringBUGREPORT_SERVICEpublic final static StringCAMERA_SERVICEpublic final static StringCAPTIONING_SERVICEpublic final static StringCARRIER_CONFIG_SERVICEpublic final static StringCLIPBOARD_SERVICEpublic final static StringCOMPANION_DEVICE_SERVICEpublic final static StringCONNECTIVITY_DIAGNOSTICS_SERVICEpublic final static StringCONNECTIVITY_SERVICEpublic final static StringCONSUMER_IR_SERVICEpublic final static StringCONTACT_KEYS_SERVICEpublic final static intCONTEXT_IGNORE_SECURITYpublic final static intCONTEXT_INCLUDE_CODEpublic final static intCONTEXT_RESTRICTEDpublic final static StringCREDENTIAL_SERVICEpublic final static StringCROSS_PROFILE_APPS_SERVICEpublic final static intDEVICE_ID_DEFAULTpublic final static intDEVICE_ID_INVALIDpublic final static StringDEVICE_LOCK_SERVICEpublic final static StringDEVICE_POLICY_SERVICEpublic final static StringDISPLAY_HASH_SERVICEpublic final static StringDISPLAY_SERVICEpublic final static StringDOMAIN_VERIFICATION_SERVICEpublic final static StringDOWNLOAD_SERVICEpublic final static StringDROPBOX_SERVICEpublic final static StringEUICC_SERVICEpublic final static StringFILE_INTEGRITY_SERVICEpublic final static StringFINGERPRINT_SERVICEpublic final static StringGAME_SERVICEpublic final static StringGRAMMATICAL_INFLECTION_SERVICEpublic final static StringHARDWARE_PROPERTIES_SERVICEpublic final static StringHEALTHCONNECT_SERVICEpublic final static StringINPUT_METHOD_SERVICEpublic final static StringINPUT_SERVICEpublic final static StringIPSEC_SERVICEpublic final static StringJOB_SCHEDULER_SERVICEpublic final static StringKEYGUARD_SERVICEpublic final static StringKEYSTORE_SERVICEpublic final static StringLAUNCHER_APPS_SERVICEpublic final static StringLAYOUT_INFLATER_SERVICEpublic final static StringLOCALE_SERVICEpublic final static StringLOCATION_SERVICEpublic final static StringMEDIA_COMMUNICATION_SERVICEpublic final static StringMEDIA_METRICS_SERVICEpublic final static StringMEDIA_PROJECTION_SERVICEpublic final static StringMEDIA_QUALITY_SERVICEpublic final static StringMEDIA_ROUTER_SERVICEpublic final static StringMEDIA_SESSION_SERVICEpublic final static StringMIDI_SERVICEpublic final static intMODE_APPENDpublic final static intMODE_ENABLE_WRITE_AHEAD_LOGGINGpublic final static intMODE_MULTI_PROCESSpublic final static intMODE_NO_LOCALIZED_COLLATORSpublic final static intMODE_PRIVATEpublic final static intMODE_WORLD_READABLEpublic final static intMODE_WORLD_WRITEABLEpublic final static StringNETWORK_STATS_SERVICEpublic final static StringNFC_SERVICEpublic final static StringNOTIFICATION_SERVICEpublic final static StringNSD_SERVICEpublic final static StringOVERLAY_SERVICEpublic final static StringPEOPLE_SERVICEpublic final static StringPERFORMANCE_HINT_SERVICEpublic final static StringPERSISTENT_DATA_BLOCK_SERVICEpublic final static StringPOWER_SERVICEpublic final static StringPRINT_SERVICEpublic final static StringPROFILING_SERVICEpublic final static intRECEIVER_EXPORTEDpublic final static intRECEIVER_NOT_EXPORTEDpublic final static intRECEIVER_VISIBLE_TO_INSTANT_APPSpublic final static StringRESTRICTIONS_SERVICEpublic final static StringROLE_SERVICEpublic final static StringSATELLITE_SERVICEpublic final static StringSEARCH_SERVICEpublic final static StringSECURITY_STATE_SERVICEpublic final static StringSENSOR_SERVICEpublic final static StringSHORTCUT_SERVICEpublic final static StringSTATUS_BAR_SERVICEpublic final static StringSTORAGE_SERVICEpublic final static StringSTORAGE_STATS_SERVICEpublic final static StringSYSTEM_HEALTH_SERVICEpublic final static StringTELECOM_SERVICEpublic final static StringTELEPHONY_IMS_SERVICEpublic final static StringTELEPHONY_SERVICEpublic final static StringTELEPHONY_SUBSCRIPTION_SERVICEpublic final static StringTETHERING_SERVICEpublic final static StringTEXT_CLASSIFICATION_SERVICEpublic final static StringTEXT_SERVICES_MANAGER_SERVICEpublic final static StringTV_AD_SERVICEpublic final static StringTV_INPUT_SERVICEpublic final static StringTV_INTERACTIVE_APP_SERVICEpublic final static StringUI_MODE_SERVICEpublic final static StringUSAGE_STATS_SERVICEpublic final static StringUSB_SERVICEpublic final static StringUSER_SERVICEpublic final static StringVIBRATOR_MANAGER_SERVICEpublic final static StringVIBRATOR_SERVICEpublic final static StringVIRTUAL_DEVICE_SERVICEpublic final static StringVPN_MANAGEMENT_SERVICEpublic final static StringWALLPAPER_SERVICEpublic final static StringWIFI_AWARE_SERVICEpublic final static StringWIFI_P2P_SERVICEpublic final static StringWIFI_RTT_RANGING_SERVICEpublic final static StringWIFI_SERVICEpublic final static StringWINDOW_SERVICE
-
Constructor Summary
Constructors Constructor Description PicturePreviewActivity()
-
Method Summary
Modifier and Type Method Description intgetResourceId()Get the layout resource ID. voidinitWidgets()voidinitPictureSelectorStyle()Dynamically set album theme voidonCreate(@Nullable() Bundle savedInstanceState)voidonResult(List<LocalMedia> images)return image result voidonDestroy()voidonImageChecked(int position)Check whether the current image is selected. voidonSelectNumChange(boolean isRefresh)Update selected image count booleanisSelected(LocalMedia image)Check whether the current image is selected. voidupdateSelector(boolean isRefresh)Update image list selection effect. voidonPageSelectedChange(LocalMedia media)ViewPager page change callback. voidonClick(View view)voidonBackPressed()voidonComplete()voidonCheckedComplete()voidonSelectedChange(boolean isAddRemove, LocalMedia media)Select or remove. voidonActivityBackPressed()Close the preview Activity -
Methods inherited from class ai.nexconn.chatui.picture.PictureBaseActivity
attachBaseContext, closeActivity, createNewFolder, dismissDialog, getContext, getImageFolder, handlerResult, onRequestPermissionsResult, onSaveInstanceState, removeImage, restoreStatusBarAppearance, saveAndApplyStatusBar, showPleaseDialog, startOpenCamera -
Methods inherited from class androidx.appcompat.app.AppCompatActivity
addContentView, attachBaseContext, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onDestroy, onKeyDown, onLocalesChanged, onMenuItemSelected, onMenuOpened, onNightModeChanged, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onStart, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask -
Methods inherited from class androidx.fragment.app.FragmentActivity
dump, getSupportFragmentManager, getSupportLoaderManager, onActivityResult, onAttachFragment, onCreate, onCreatePanelMenu, onCreateView, onLowMemory, onMultiWindowModeChanged, onNewIntent, onPause, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onRequestPermissionsResult, onResume, onResumeFragments, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode -
Methods inherited from class androidx.activity.ComponentActivity
addMenuProvider, addOnConfigurationChangedListener, addOnContextAvailableListener, addOnMultiWindowModeChangedListener, addOnNewIntentListener, addOnPictureInPictureModeChangedListener, addOnTrimMemoryListener, getActivityResultRegistry, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getLastCustomNonConfigurationInstance, getLifecycle, getOnBackPressedDispatcher, getSavedStateRegistry, getViewModelStore, invalidateMenu, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onSaveInstanceState, onTrimMemory, peekAvailableContext, registerForActivityResult, removeMenuProvider, removeOnConfigurationChangedListener, removeOnContextAvailableListener, removeOnMultiWindowModeChangedListener, removeOnNewIntentListener, removeOnPictureInPictureModeChangedListener, removeOnTrimMemoryListener, reportFullyDrawn, startActivityForResult, startIntentSenderForResult -
Methods inherited from class androidx.core.app.ComponentActivity
dispatchKeyShortcutEvent, getExtraData, putExtraData, shouldDumpInternalState, superDispatchKeyEvent -
Methods inherited from class android.app.Activity
clearOverrideActivityTransition, closeContextMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCaller, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentCaller, getCurrentFocus, getFragmentManager, getInitialCaller, getIntent, getLastNonConfigurationInstance, getLaunchedFromPackage, getLaunchedFromUid, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getOnBackInvokedDispatcher, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSplashScreen, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLaunchedFromBubble, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onGetDirectActions, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPerformDirectAction, onPictureInPictureRequested, onPictureInPictureUiStateChanged, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onSearchRequested, onTopResumedActivityChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, overrideActivityTransition, overridePendingTransition, postponeEnterTransition, recreate, registerActivityLifecycleCallbacks, registerComponentCallbacks, registerForContextMenu, registerScreenCaptureCallback, releaseInstance, removeDialog, requestDragAndDropPermissions, requestFullscreenMode, requestOpenInBrowserEducation, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setAllowCrossUidActivitySwitchFromBelow, setContentTransitionManager, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked, setIntent, setLocusContext, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRecentsScreenshotEnabled, setRequestedOrientation, setResult, setSecondaryProgress, setShouldDockBigOverlays, setShowWhenLocked, setTaskDescription, setTitle, setTitleColor, setTranslucent, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldDockBigOverlays, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActivities, startActivity, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterActivityLifecycleCallbacks, unregisterComponentCallbacks, unregisterForContextMenu, unregisterScreenCaptureCallback -
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, getAssets, getTheme -
Methods inherited from class android.view.Window.Callback
onPointerCaptureChanged -
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, bindService, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkContentUriPermissionFull, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, getDeviceId, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFileStreamPath, getFilesDir, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerDeviceIdChangeListener, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, sendBroadcast, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterDeviceIdChangeListener, unregisterReceiver, updateServiceGroup -
Methods inherited from class android.content.Context
getColor, getColorStateList, getDrawable, getString, getSystemService, getText, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getResourceId
int getResourceId()
Get the layout resource ID.
-
initWidgets
void initWidgets()
-
initPictureSelectorStyle
void initPictureSelectorStyle()
Dynamically set album theme
-
onCreate
void onCreate(@Nullable() Bundle savedInstanceState)
-
onResult
void onResult(List<LocalMedia> images)
return image result
-
onDestroy
void onDestroy()
-
onImageChecked
void onImageChecked(int position)
Check whether the current image is selected.
-
onSelectNumChange
void onSelectNumChange(boolean isRefresh)
Update selected image count
-
isSelected
boolean isSelected(LocalMedia image)
Check whether the current image is selected.
-
updateSelector
void updateSelector(boolean isRefresh)
Update image list selection effect.
-
onPageSelectedChange
void onPageSelectedChange(LocalMedia media)
ViewPager page change callback.
-
onClick
void onClick(View view)
-
onBackPressed
void onBackPressed()
-
onComplete
void onComplete()
-
onCheckedComplete
void onCheckedComplete()
-
onSelectedChange
void onSelectedChange(boolean isAddRemove, LocalMedia media)
Select or remove.
-
onActivityBackPressed
void onActivityBackPressed()
Close the preview Activity
-
-
-
-