Assume I have a fragment called "LoginFragment". I want to use this fragment in add transaction below:
fTransaction.add(R.id.login_fragment, LoginFragment())
But I need call it by name dynamically like this:
val name = "LoginFragment"
fTransaction.add(R.id.login_fragment, name())
How should I do this? Thank you