Last active
August 6, 2018 11:00
-
-
Save shanmugasanthosh7/a883e3fdde7b97423d82b6901e4a0f33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TypeSafeFragment : Fragment() { | |
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle?): View? { | |
// Inflate the layout for this fragment | |
return inflater.inflate(R.layout.fragment_type_safe, container, false) | |
} | |
override fun onActivityCreated(savedInstanceState: Bundle?) { | |
super.onActivityCreated(savedInstanceState) | |
passTypeSafe.setOnClickListener { | |
val action = TypeSafeFragmentDirections.actionTypeSafeFragmentToPassTypeSafeFragment() | |
action.setName("Santhosh") | |
Navigation.findNavController(activity!!,R.id.my_nav_host_fragment).navigate(action) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment