![]() Well to handle that kind of scenario combination of apply and also works well. fun loadFragment(loadToBackStack:Boolean = false, load: FragmentTransaction.() -> Any) So let’s see how higher order function can help out . No need of a return statement.Load Fragment In case you want to load fragment than it’s important to commit the transaction and in case you forget it than studio do gives warning but there should be some better way to fix it rather than manually adding commit to your transactions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |