arch-android

//Android/br.com.arch.toolkit.android.foldable.activity/FoldableActivity

FoldableActivity

[android]
abstract class FoldableActivity : AppCompatActivity

An abstract base AppCompatActivity that simplifies handling foldable devices.

It automatically manages layout inflation for different folding states based on the provided orientation and layout IDs.

Constructors

   
FoldableActivity [android]
constructor()

Properties

Name Summary
activityResultRegistry [android]
@get:NonNull
val activityResultRegistry: ActivityResultRegistry
defaultViewModelCreationExtras [android]
@get:NonNull
@get:CallSuper
open val defaultViewModelCreationExtras: CreationExtras
defaultViewModelProviderFactory [android]
@get:NonNull
open val defaultViewModelProviderFactory: ViewModelProvider.Factory
delegate [android]
@get:NonNull
open val delegate: AppCompatDelegate
drawerToggleDelegate [android]
@get:Nullable
open val drawerToggleDelegate: ActionBarDrawerToggle.Delegate?
fullyDrawnReporter [android]
@get:NonNull
open val fullyDrawnReporter: FullyDrawnReporter
lastCustomNonConfigurationInstance [android]
open val lastCustomNonConfigurationInstance: Any?
lifecycle [android]
@get:NonNull
open val lifecycle: Lifecycle
menuInflater [android]
@get:NonNull
open val menuInflater: @EnhancedNullability android/view/MenuInflater
onBackPressedDispatcher [android]
@get:NonNull
val onBackPressedDispatcher: OnBackPressedDispatcher
resources [android]
open val resources: android/content/res/Resources??
savedStateRegistry [android]
@get:NonNull
val savedStateRegistry: SavedStateRegistry
supportActionBar [android]
@get:Nullable
open val supportActionBar: ActionBar?
supportFragmentManager [android]
@get:NonNull
open val supportFragmentManager: FragmentManager
supportLoaderManager [android]
open val supportLoaderManager: LoaderManager
supportParentActivityIntent [android]
@get:Nullable
open val supportParentActivityIntent: @EnhancedNullability android/content/Intent??
viewModelStore [android]
@get:NonNull
open val viewModelStore: ViewModelStore

Functions

Name Summary
addContentView [android]
open fun addContentView(view: android/view/View??, params: android/view/ViewGroup/LayoutParams??)
addMenuProvider [android]
open fun addMenuProvider(@NonNullprovider: MenuProvider)
open fun addMenuProvider(@NonNullprovider: MenuProvider, @NonNullowner: LifecycleOwner)
open fun addMenuProvider(@NonNullprovider: MenuProvider, @NonNullowner: LifecycleOwner, @NonNullstate: Lifecycle.State)
addOnConfigurationChangedListener [android]
fun addOnConfigurationChangedListener(@NonNulllistener: Consumer<@EnhancedNullability android/content/res/Configuration>)
addOnContextAvailableListener [android]
fun addOnContextAvailableListener(@NonNulllistener: OnContextAvailableListener)
addOnMultiWindowModeChangedListener [android]
fun addOnMultiWindowModeChangedListener(@NonNulllistener: Consumer<MultiWindowModeChangedInfo>)
addOnNewIntentListener [android]
fun addOnNewIntentListener(@NonNulllistener: Consumer<@EnhancedNullability android/content/Intent>)
addOnPictureInPictureModeChangedListener [android]
fun addOnPictureInPictureModeChangedListener(@NonNulllistener: Consumer<PictureInPictureModeChangedInfo>)
addOnTrimMemoryListener [android]
fun addOnTrimMemoryListener(@NonNulllistener: Consumer<Int>)
closeOptionsMenu [android]
open fun closeOptionsMenu()
dispatchKeyEvent [android]
open fun dispatchKeyEvent(event: @EnhancedNullability android/view/KeyEvent): Boolean
dispatchKeyShortcutEvent [android]
open fun dispatchKeyShortcutEvent(event: android/view/KeyEvent): Boolean
dump [android]
open fun dump(@NonNullprefix: String, @Nullablefd: FileDescriptor?, @NonNullwriter: PrintWriter, @Nullableargs: Array<out String?>??)
findViewById [android]
open fun <T : android/view/View??> findViewById(@IdResid: Int): T?
handleFoldableStateChange [android]
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation): Job
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation, onChangeState: (isFolded: Boolean) -> Unit?): Job
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation, onChangeState: (isFolded: Boolean) -> Unit?, onWrongOrientation: () -> Unit?): Job
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation, onChangeState: (isFolded: Boolean) -> Unit?, onWrongOrientation: () -> Unit?, onOpenFlat: (Int, FoldingFeature.Orientation) -> Unit?): Job
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation, onChangeState: (isFolded: Boolean) -> Unit?, onWrongOrientation: () -> Unit?, onOpenFlat: (Int, FoldingFeature.Orientation) -> Unit?, onHalfOpen: (Int, FoldingFeature.Orientation) -> Unit?): Job
fun FragmentActivity.handleFoldableStateChange(layout: ERROR CLASS: Symbol not found for ViewGroup, @IdResreactiveGuideId: Int, orientation: FoldingFeature.Orientation, onChangeState: (isFolded: Boolean) -> Unit?, onWrongOrientation: () -> Unit?, onOpenFlat: (Int, FoldingFeature.Orientation) -> Unit?, onHalfOpen: (Int, FoldingFeature.Orientation) -> Unit?, onClosed: () -> Unit?): Job
Observes the activity and handles device state changes
initializeViewTreeOwners [android]
@CallSuper
open fun initializeViewTreeOwners()
invalidateMenu [android]
open fun invalidateMenu()
invalidateOptionsMenu [android]
open fun invalidateOptionsMenu()
observeFoldableStateChanges [android]
fun ComponentActivity.observeFoldableStateChanges(layout: ERROR CLASS: Symbol not found for ViewGroup, orientation: FoldingFeature.Orientation, listener: OnFoldableStateChangeListener): Job
Observes the activity and notifies on device state changes
onConfigurationChanged [android]
open fun onConfigurationChanged(@NonNullnewConfig: @EnhancedNullability android/content/res/Configuration)
onContentChanged [android]
open fun onContentChanged()
onCreate [android]
open override fun onCreate(savedInstanceState: ERROR CLASS: Symbol not found for Bundle??)
onCreatePanelMenu [android]
open fun onCreatePanelMenu(featureId: Int, @NonNullmenu: @EnhancedNullability android/view/Menu): Boolean
onCreateSupportNavigateUpTaskStack [android]
open fun onCreateSupportNavigateUpTaskStack(@NonNullbuilder: TaskStackBuilder)
onCreateView [android]
@Nullable
open fun onCreateView(@NonNullname: String, @NonNullcontext: @EnhancedNullability android/content/Context, @NonNullattrs: @EnhancedNullability android/util/AttributeSet): @EnhancedNullability android/view/View??
@Nullable
open fun onCreateView(@Nullableparent: @EnhancedNullability android/view/View??, @NonNullname: String, @NonNullcontext: @EnhancedNullability android/content/Context, @NonNullattrs: @EnhancedNullability android/util/AttributeSet): @EnhancedNullability android/view/View??
onKeyDown [android]
open fun onKeyDown(keyCode: Int, event: android/view/KeyEvent??): Boolean
onMenuItemSelected [android]
fun onMenuItemSelected(featureId: Int, @NonNullitem: @EnhancedNullability android/view/MenuItem): Boolean
onMenuOpened [android]
open fun onMenuOpened(featureId: Int, menu: android/view/Menu??): Boolean
onMultiWindowModeChanged [android]
@CallSuper
open fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean)
@RequiresApi(api = 26)
@CallSuper
open fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean, @NonNullnewConfig: @EnhancedNullability android/content/res/Configuration)
onNewLayoutInfo [android]
fun ComponentActivity.onNewLayoutInfo(func: (WindowLayoutInfo) -> Unit): Job
Observes the activity and notifies on device state changes
onPanelClosed [android]
open fun onPanelClosed(featureId: Int, @NonNullmenu: @EnhancedNullability android/view/Menu)
onPictureInPictureModeChanged [android]
@CallSuper
open fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)
@RequiresApi(api = 26)
@CallSuper
open fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, @NonNullnewConfig: @EnhancedNullability android/content/res/Configuration)
onPreparePanel [android]
open fun onPreparePanel(featureId: Int, @Nullableview: @EnhancedNullability android/view/View??, @NonNullmenu: @EnhancedNullability android/view/Menu): Boolean
onPrepareSupportNavigateUpTaskStack [android]
open fun onPrepareSupportNavigateUpTaskStack(@NonNullbuilder: TaskStackBuilder)
onRequestPermissionsResult [android]
@CallSuper
open fun onRequestPermissionsResult(requestCode: Int, @NonNullpermissions: Array<out String?>, @NonNullgrantResults: IntArray)
onRetainNonConfigurationInstance [android]
@Nullable
fun onRetainNonConfigurationInstance(): Any?
onStateNotSaved [android]
open fun onStateNotSaved()
onSupportActionModeFinished [android]
@CallSuper
open fun onSupportActionModeFinished(@NonNullmode: ActionMode)
onSupportActionModeStarted [android]
@CallSuper
open fun onSupportActionModeStarted(@NonNullmode: ActionMode)
onSupportNavigateUp [android]
open fun onSupportNavigateUp(): Boolean
onTrimMemory [android]
@CallSuper
open fun onTrimMemory(level: Int)
onWindowStartingSupportActionMode [android]
@Nullable
open fun onWindowStartingSupportActionMode(@NonNullcallback: ActionMode.Callback): ActionMode?
openOptionsMenu [android]
open fun openOptionsMenu()
peekAvailableContext [android]
@Nullable
open fun peekAvailableContext(): @EnhancedNullability android/content/Context??
registerForActivityResult [android]
@NonNull
fun <I : Any?, O : Any?> registerForActivityResult(@NonNullcontract: ActivityResultContract<I?, O?>, @NonNullcallback: ActivityResultCallback<O?>): ActivityResultLauncher<I?>
@NonNull
fun <I : Any?, O : Any?> registerForActivityResult(@NonNullcontract: ActivityResultContract<I?, O?>, @NonNullregistry: ActivityResultRegistry, @NonNullcallback: ActivityResultCallback<O?>): ActivityResultLauncher<I?>
removeMenuProvider [android]
open fun removeMenuProvider(@NonNullprovider: MenuProvider)
removeOnConfigurationChangedListener [android]
fun removeOnConfigurationChangedListener(@NonNulllistener: Consumer<@EnhancedNullability android/content/res/Configuration>)
removeOnContextAvailableListener [android]
fun removeOnContextAvailableListener(@NonNulllistener: OnContextAvailableListener)
removeOnMultiWindowModeChangedListener [android]
fun removeOnMultiWindowModeChangedListener(@NonNulllistener: Consumer<MultiWindowModeChangedInfo>)
removeOnNewIntentListener [android]
fun removeOnNewIntentListener(@NonNulllistener: Consumer<@EnhancedNullability android/content/Intent>)
removeOnPictureInPictureModeChangedListener [android]
fun removeOnPictureInPictureModeChangedListener(@NonNulllistener: Consumer<PictureInPictureModeChangedInfo>)
removeOnTrimMemoryListener [android]
fun removeOnTrimMemoryListener(@NonNulllistener: Consumer<Int>)
reportFullyDrawn [android]
open fun reportFullyDrawn()
setContentView [android]
open fun setContentView(view: android/view/View??)
open fun setContentView(@LayoutReslayoutResID: Int)
open fun setContentView(view: android/view/View??, params: android/view/ViewGroup/LayoutParams??)
setEnterSharedElementCallback [android]
open fun setEnterSharedElementCallback(@Nullablecallback: SharedElementCallback?)
setExitSharedElementCallback [android]
open fun setExitSharedElementCallback(@Nullablelistener: SharedElementCallback?)
setSupportActionBar [android]
open fun setSupportActionBar(@Nullabletoolbar: Toolbar?)
setTheme [android]
open fun setTheme(@StyleResresId: Int)
startActivityFromFragment [android]
open fun startActivityFromFragment(@NonNullfragment: Fragment, intent: android/content/Intent??, requestCode: Int)
open fun startActivityFromFragment(@NonNullfragment: Fragment, intent: android/content/Intent??, requestCode: Int, @Nullableoptions: @EnhancedNullability android/os/Bundle??)
startSupportActionMode [android]
@Nullable
open fun startSupportActionMode(@NonNullcallback: ActionMode.Callback): ActionMode?
superDispatchKeyEvent [android]
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
open override fun superDispatchKeyEvent(event: android/view/KeyEvent): Boolean
supportFinishAfterTransition [android]
open fun supportFinishAfterTransition()
supportInvalidateOptionsMenu [android]
open fun supportInvalidateOptionsMenu()
supportNavigateUpTo [android]
open fun supportNavigateUpTo(@NonNullupIntent: @EnhancedNullability android/content/Intent)
supportPostponeEnterTransition [android]
open fun supportPostponeEnterTransition()
supportRequestWindowFeature [android]
open fun supportRequestWindowFeature(featureId: Int): Boolean
supportShouldUpRecreateTask [android]
open fun supportShouldUpRecreateTask(@NonNulltargetIntent: @EnhancedNullability android/content/Intent): Boolean
supportStartPostponedEnterTransition [android]
open fun supportStartPostponedEnterTransition()