-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.ComponentCallbacks2,android.view.KeyEvent.Callback,android.view.LayoutInflater.Factory,android.view.LayoutInflater.Factory2,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.TaskStackBuilder.SupportParentable,androidx.core.view.KeyEventDispatcher.Component,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,com.lightningkite.rx.viewgenerators.ActivityAccess
public abstract class AccessibleActivity extends AppCompatActivity implements ActivityAccess
An activity that implements ActivityAccess.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAccessibleActivity.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Activityactivityprivate final Contextcontextprivate BundlesavedInstanceStateprivate final PublishSubject<Unit>onResumeprivate final PublishSubject<Unit>onPauseprivate final PublishSubject<Bundle>onSaveInstanceStateprivate final PublishSubject<Unit>onLowMemoryprivate final PublishSubject<Unit>onDestroyprivate final PublishSubject<Triple<Integer, Integer, Intent>>onActivityResultprivate final PublishSubject<Intent>onNewIntentprivate final HashMap<Integer, Function1<Map<String, Integer>, Unit>>requestReturnsprivate final FragmentControllermFragmentsprivate final LifecycleRegistrymFragmentLifecycleRegistryprivate final BooleanmCreatedprivate final BooleanmResumedprivate final BooleanmStoppedprivate final ContextAwareHelpermContextAwareHelperprivate final SavedStateRegistryControllermSavedStateRegistryController
-
Constructor Summary
Constructors Constructor Description AccessibleActivity()
-
Method Summary
Modifier and Type Method Description ActivitygetActivity()Gets the activity. ContextgetContext()Gets the context. BundlegetSavedInstanceState()Gets the savedInstanceState of the activity. UnitsetSavedInstanceState(Bundle savedInstanceState)Gets the savedInstanceState of the activity. PublishSubject<Unit>getOnResume()Listens to the onResume callback of the activity. PublishSubject<Unit>getOnPause()Listens to the onPause callback of the activity. PublishSubject<Bundle>getOnSaveInstanceState()Listens to the onSaveInstanceState callback of the activity. PublishSubject<Unit>getOnLowMemory()Listens to the onLowMemory callback of the activity. PublishSubject<Unit>getOnDestroy()Listens to the onDestroy callback of the activity. PublishSubject<Triple<Integer, Integer, Intent>>getOnActivityResult()Listens to the onActivityResult callback of the activity. PublishSubject<Intent>getOnNewIntent()Listens to the onNewIntent callback of the activity. final HashMap<Integer, Function1<Map<String, Integer>, Unit>>getRequestReturns()UnitonLowMemory()IntegerprepareOnResult(Integer presetCode, Function2<Integer, Intent, Unit> onResult)Returns a request code for starting an intent where the onResult function will be called upon completion. UnitperformBackPress()Performs a back button press on the activity. Single<Set<String>>requestPermissions(Array<String> permission)Requests a bunch of permissions and returns a map of permissions that were previously ungranted and their new status. Single<Boolean>requestPermission(String permission)Requests a single permissions and returns whether it was granted or not. UnitonRequestPermissionsResult(Integer requestCode, Array<out String> permissions, IntArray grantResults)-
Methods inherited from class androidx.core.app.ComponentActivity
closeContextMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, 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, onAttachFragment, onAttachedToWindow, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onGetDirectActions, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPerformDirectAction, onPictureInPictureModeChanged, onPictureInPictureRequested, onPictureInPictureUiStateChanged, onPostCreate, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onTopResumedActivityChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, overridePendingTransition, postponeEnterTransition, recreate, registerActivityLifecycleCallbacks, registerForContextMenu, releaseInstance, removeDialog, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setContentTransitionManager, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked, setIntent, setLocusContext, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setShowWhenLocked, setTaskDescription, setTitle, setTitle, setTitleColor, setTranslucent, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterActivityLifecycleCallbacks, unregisterForContextMenu -
Methods inherited from class android.app.Activity
applyOverrideConfiguration, getAssets, getTheme, onPointerCaptureChanged, setTheme -
Methods inherited from class com.lightningkite.rx.viewgenerators.AccessibleActivity
addContentView, attachBaseContext, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onKeyDown, onMenuItemSelected, onMenuOpened, onNightModeChanged, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onStart, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask -
Methods inherited from class android.view.ContextThemeWrapper
bindIsolatedService, bindService, bindService, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, 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, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceiver, updateServiceGroup -
Methods inherited from class android.content.ContextWrapper
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, sendBroadcastWithMultiplePermissions, unregisterComponentCallbacks -
Methods inherited from class androidx.appcompat.app.AppCompatActivity
dispatchFragmentsOnCreateView, dump, getSupportFragmentManager, getSupportLoaderManager, markFragmentsCreated, onAttachFragment, onCreatePanelMenu, onCreateView, onCreateView, onMultiWindowModeChanged, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onResumeFragments, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityFromFragment, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode -
Methods inherited from class androidx.activity.ComponentActivity
dispatchKeyShortcutEvent, getExtraData, putExtraData, superDispatchKeyEvent -
Methods inherited from class androidx.fragment.app.FragmentActivity
addOnContextAvailableListener, ensureViewModelStore, getActivityResultRegistry, getDefaultViewModelProviderFactory, getLastCustomNonConfigurationInstance, getLifecycle, getOnBackPressedDispatcher, getSavedStateRegistry, getViewModelStore, onBackPressed, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, peekAvailableContext, registerForActivityResult, registerForActivityResult, removeOnContextAvailableListener, reportFullyDrawn, startActivityForResult, startActivityForResult, startIntentSenderForResult, startIntentSenderForResult -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getActivity
Activity getActivity()
Gets the activity.
-
getContext
Context getContext()
Gets the context. If you need to preview a view generator using Android Studio, it can be useful to have this separate from Activity.
-
getSavedInstanceState
Bundle getSavedInstanceState()
Gets the savedInstanceState of the activity.
-
setSavedInstanceState
Unit setSavedInstanceState(Bundle savedInstanceState)
Gets the savedInstanceState of the activity.
-
getOnResume
PublishSubject<Unit> getOnResume()
Listens to the onResume callback of the activity.
-
getOnPause
PublishSubject<Unit> getOnPause()
Listens to the onPause callback of the activity.
-
getOnSaveInstanceState
PublishSubject<Bundle> getOnSaveInstanceState()
Listens to the onSaveInstanceState callback of the activity.
-
getOnLowMemory
PublishSubject<Unit> getOnLowMemory()
Listens to the onLowMemory callback of the activity.
-
getOnDestroy
PublishSubject<Unit> getOnDestroy()
Listens to the onDestroy callback of the activity.
-
getOnActivityResult
PublishSubject<Triple<Integer, Integer, Intent>> getOnActivityResult()
Listens to the onActivityResult callback of the activity.
-
getOnNewIntent
PublishSubject<Intent> getOnNewIntent()
Listens to the onNewIntent callback of the activity.
-
onLowMemory
Unit onLowMemory()
-
prepareOnResult
Integer prepareOnResult(Integer presetCode, Function2<Integer, Intent, Unit> onResult)
Returns a request code for starting an intent where the onResult function will be called upon completion. Use this instead of overriding Activity.onActivityResult.
-
performBackPress
Unit performBackPress()
Performs a back button press on the activity.
-
requestPermissions
Single<Set<String>> requestPermissions(Array<String> permission)
Requests a bunch of permissions and returns a map of permissions that were previously ungranted and their new status.
-
requestPermission
Single<Boolean> requestPermission(String permission)
Requests a single permissions and returns whether it was granted or not.
-
-
-
-