C# Class MvvmCross.Droid.FullFragging.Caching.MvxCachingFragmentActivity

Inheritance: Views.MvxActivity, IFragmentCacheableActivity, IMvxFragmentHost
Mostra file Open project: MvvmCross/MvvmCross

Public Methods

Method Description
BuildFragmentCacheConfiguration ( ) : IFragmentCacheConfiguration
Close ( IMvxViewModel viewModel ) : bool
OnBackPressed ( ) : void
OnBeforeFragmentChanging ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
OnFragmentChanged ( IMvxCachedFragmentInfo fragmentInfo ) : void
OnFragmentChanging ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
OnFragmentCreated ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
OnFragmentPopped ( IList currentFragmentsInfo ) : void
Show ( MvxViewModelRequest request, Bundle bundle, Type fragmentType, MvxFragmentAttribute fragmentAttribute ) : bool

Protected Methods

Method Description
CloseFragment ( string tag, int contentId ) : void

Close Fragment with a specific tag at a specific placeholder

FragmentJavaName ( Type fragmentType ) : string
GetCurrentCacheableFragments ( ) : IEnumerable
GetCurrentCacheableFragmentsInfo ( ) : List
GetFragmentInfoByTag ( string tag ) : IMvxCachedFragmentInfo
GetFragmentTag ( MvxViewModelRequest request, Bundle bundle, Type fragmentType ) : string
GetLastFragmentInfo ( ) : IMvxCachedFragmentInfo
GetTagFromFragment ( Fragment fragment ) : string
MvxCachingFragmentActivity ( ) : System
MvxCachingFragmentActivity ( IntPtr javaReference, JniHandleOwnership transfer ) : System
OnCreate ( Bundle bundle ) : void
OnPostCreate ( Bundle savedInstanceState ) : void
OnSaveInstanceState ( Bundle outState ) : void
ReplaceFragment ( FragmentTransaction ft, IMvxCachedFragmentInfo fragInfo ) : void
ShouldReplaceCurrentFragment ( IMvxCachedFragmentInfo newFragment, IMvxCachedFragmentInfo currentFragment, Bundle replacementBundle ) : FragmentReplaceMode
ShowFragment ( string tag, int contentId, Bundle bundle, bool forceAddToBackStack = false, bool forceReplaceFragment = false ) : void

Show Fragment with a specific tag at a specific placeholder

Private Methods

Method Description
CreateFragmentTypesDictionary ( Bundle outState ) : Type>.Dictionary
RestoreFragmentsCache ( ) : void
RestoreViewModelsFromBundle ( IMvxJsonConverter serializer, Bundle savedInstanceState ) : void

Method Details

BuildFragmentCacheConfiguration() public method

public BuildFragmentCacheConfiguration ( ) : IFragmentCacheConfiguration
return IFragmentCacheConfiguration

Close() public method

public Close ( IMvxViewModel viewModel ) : bool
viewModel IMvxViewModel
return bool

CloseFragment() protected method

Close Fragment with a specific tag at a specific placeholder
protected CloseFragment ( string tag, int contentId ) : void
tag string The tag for the fragment to lookup
contentId int Where you want to close the Fragment
return void

FragmentJavaName() protected method

protected FragmentJavaName ( Type fragmentType ) : string
fragmentType System.Type
return string

GetCurrentCacheableFragments() protected method

protected GetCurrentCacheableFragments ( ) : IEnumerable
return IEnumerable

GetCurrentCacheableFragmentsInfo() protected method

protected GetCurrentCacheableFragmentsInfo ( ) : List
return List

GetFragmentInfoByTag() protected method

protected GetFragmentInfoByTag ( string tag ) : IMvxCachedFragmentInfo
tag string
return IMvxCachedFragmentInfo

GetFragmentTag() protected method

protected GetFragmentTag ( MvxViewModelRequest request, Bundle bundle, Type fragmentType ) : string
request MvvmCross.Core.ViewModels.MvxViewModelRequest
bundle Bundle
fragmentType System.Type
return string

GetLastFragmentInfo() protected method

protected GetLastFragmentInfo ( ) : IMvxCachedFragmentInfo
return IMvxCachedFragmentInfo

GetTagFromFragment() protected method

protected GetTagFromFragment ( Fragment fragment ) : string
fragment Fragment
return string

MvxCachingFragmentActivity() protected method

protected MvxCachingFragmentActivity ( ) : System
return System

MvxCachingFragmentActivity() protected method

protected MvxCachingFragmentActivity ( IntPtr javaReference, JniHandleOwnership transfer ) : System
javaReference System.IntPtr
transfer JniHandleOwnership
return System

OnBackPressed() public method

public OnBackPressed ( ) : void
return void

OnBeforeFragmentChanging() public method

public OnBeforeFragmentChanging ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
fragmentInfo IMvxCachedFragmentInfo
transaction FragmentTransaction
return void

OnCreate() protected method

protected OnCreate ( Bundle bundle ) : void
bundle Bundle
return void

OnFragmentChanged() public method

public OnFragmentChanged ( IMvxCachedFragmentInfo fragmentInfo ) : void
fragmentInfo IMvxCachedFragmentInfo
return void

OnFragmentChanging() public method

public OnFragmentChanging ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
fragmentInfo IMvxCachedFragmentInfo
transaction FragmentTransaction
return void

OnFragmentCreated() public method

public OnFragmentCreated ( IMvxCachedFragmentInfo fragmentInfo, FragmentTransaction transaction ) : void
fragmentInfo IMvxCachedFragmentInfo
transaction FragmentTransaction
return void

OnFragmentPopped() public method

public OnFragmentPopped ( IList currentFragmentsInfo ) : void
currentFragmentsInfo IList
return void

OnPostCreate() protected method

protected OnPostCreate ( Bundle savedInstanceState ) : void
savedInstanceState Bundle
return void

OnSaveInstanceState() protected method

protected OnSaveInstanceState ( Bundle outState ) : void
outState Bundle
return void

ReplaceFragment() protected method

protected ReplaceFragment ( FragmentTransaction ft, IMvxCachedFragmentInfo fragInfo ) : void
ft FragmentTransaction
fragInfo IMvxCachedFragmentInfo
return void

ShouldReplaceCurrentFragment() protected method

protected ShouldReplaceCurrentFragment ( IMvxCachedFragmentInfo newFragment, IMvxCachedFragmentInfo currentFragment, Bundle replacementBundle ) : FragmentReplaceMode
newFragment IMvxCachedFragmentInfo
currentFragment IMvxCachedFragmentInfo
replacementBundle Bundle
return FragmentReplaceMode

Show() public method

public Show ( MvxViewModelRequest request, Bundle bundle, Type fragmentType, MvxFragmentAttribute fragmentAttribute ) : bool
request MvvmCross.Core.ViewModels.MvxViewModelRequest
bundle Bundle
fragmentType System.Type
fragmentAttribute MvvmCross.Droid.Shared.Attributes.MvxFragmentAttribute
return bool

ShowFragment() protected method

Show Fragment with a specific tag at a specific placeholder
protected ShowFragment ( string tag, int contentId, Bundle bundle, bool forceAddToBackStack = false, bool forceReplaceFragment = false ) : void
tag string The tag for the fragment to lookup
contentId int Where you want to show the Fragment
bundle Bundle Bundle which usually contains a Serialized MvxViewModelRequest
forceAddToBackStack bool If you want to force add the fragment to the backstack so on backbutton it will go back to it. Note: This will override IMvxCachedFragmentInfo.AddToBackStack configuration.
forceReplaceFragment bool If you want the fragment to be re-created
return void