Guest User

Untitled

a guest
Dec 9th, 2019
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class WeatherDetailFragment : Fragment() {
  2.  
  3.   companion object {
  4.     fun newInstance(weatherModel: WeatherModel): WeatherDetailFragment {
  5.       val args = Bundle()
  6.       args.putSerializable("WEATHER",weatherModel)
  7.       val frag = TicketFragment()
  8.       frag.arguments = args
  9.       return frag
  10.     }
  11.   }
  12.  
  13.   override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
  14.     return inflater.inflate(R.layout.ticket_fragment_layout,container,false)
  15.   }
  16.  
  17.   override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  18.     super.onViewCreated(view, savedInstanceState)
  19.     val weather = arguments?.getSerializable("WEATHER") as WeatherModel // ესეც შენი მოდელი
  20.   }
RAW Paste Data