Merge pull request #136 from TouchInstinct/bugs/view_controller

Bugs/view controller
This commit is contained in:
Anton Domnikov 2018-10-29 16:29:50 +03:00 committed by GitHub
commit bcb22fa542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -433,6 +433,10 @@ public abstract class ViewController<TActivity extends FragmentActivity, TState
this.container = container;
}
@Nullable
public ViewGroup getContainer() {
return container;
}
}
}

View File

@ -50,6 +50,7 @@ open class ViewControllerNavigation<TActivity : FragmentActivity>(
* @param viewControllerClass Class of [ViewController] to be pushed;
* @param state [Parcelable] of [ViewController]'s fragment;
* @param addToStack Flag to add this transaction to the back stack;
* @param backStackName Name of [Fragment] in back stack;
* @param transactionSetup Function to setup transaction before commit. It is useful to specify transition animations or additional info;
* @param TState Type of state of fragment.
*/
@ -57,6 +58,7 @@ open class ViewControllerNavigation<TActivity : FragmentActivity>(
viewControllerClass: Class<out ViewController<out TActivity, TState>>,
state: TState,
addToStack: Boolean = true,
backStackName: String? = null,
transactionSetup: ((FragmentTransaction) -> Unit)? = null
) {
addToStack(
@ -65,7 +67,7 @@ open class ViewControllerNavigation<TActivity : FragmentActivity>(
0,
addToStack,
ViewControllerFragment.args(viewControllerClass, state),
null,
backStackName,
transactionSetup
)
}