Skip to content

Instantly share code, notes, and snippets.

@prasannajeet
Created September 3, 2018 17:47
Show Gist options
  • Save prasannajeet/eabe9db1d29fdfd30db22cbef94eca6d to your computer and use it in GitHub Desktop.
Save prasannajeet/eabe9db1d29fdfd30db22cbef94eca6d to your computer and use it in GitHub Desktop.
package com.praszapps.mysamplenavapp
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.fragment_destination.*
class DestinationFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_destination, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val name = DestinationFragmentArgs.fromBundle(arguments).nameToShow
welcomeWithNameTv.text = "Hello $name!"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment