JingYeoh / FragmentRigger

:boom:A powerful library powered by AOP to manage Fragments.(一个基于AOP设计的Fragment管理框架)
MIT License
2.26k stars 266 forks source link

Understanding onBackPressed. #58

Open Devspm opened 6 years ago

Devspm commented 6 years ago

Hi,thanks for the library. I'm having problem with understanding onRiggerBackPressed and onInterruptBackPressed. How can i let the activity's onBackPressed to execute when using onRiggerBackPressed ?

JingYeoh commented 6 years ago

@Devspm if Activity want to interrupt onBackPressed method , you can define a method named onInterruptBackPressed in Activity and return true .

Fragment and Activity is a tree structure , you can choose to interrupt in any level , just return true in onInterruptBackPressed .