Created
May 26, 2018 16:16
-
-
Save shanmugasanthosh7/deaff1b3027196aa1781854a480a1c72 to your computer and use it in GitHub Desktop.
Receives Type Safe arguments
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 PassTypeSafeFragment : Fragment() { | |
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle?): View? { | |
// Inflate the layout for this fragment | |
return inflater.inflate(R.layout.fragment_pass_type_safe, container, false) | |
} | |
override fun onActivityCreated(savedInstanceState: Bundle?) { | |
super.onActivityCreated(savedInstanceState) | |
val name = PassTypeSafeFragmentArgs.fromBundle(arguments).name | |
passTypeValue.text = name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment