Created
April 19, 2021 21:18
-
-
Save fvilarino/79294afea87a46a6b589128adc58cc21 to your computer and use it in GitHub Desktop.
Forecast Fragment
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
override fun onCreateView( | |
inflater: LayoutInflater, | |
container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View { | |
binding = FragmentForecastBinding.inflate(inflater, container, false) | |
binding.lifecycleOwner = this | |
return binding.root | |
} | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
lifecycle.addObserver(viewModel) | |
val adapter = TypedBaseAdapter<RecyclerViewBindingItem>() | |
binding.forecastList.adapter = adapter | |
binding.forecastList.setHasFixedSize(true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment