Another question from my colleague: we use Flow inside ViewModel and convert to LiveData which Fragment observes. When we should set the context parameter when using asLiveData()?

A question from my colleague: if we want to initialize a mutable list as the fragment’s variable, should we do it directly in the declaration or onCreate method? And what’s the difference?

class SampleFragment : Fragment()…

architecture for various modules on one page

Introduction

Bram Yeh

Lead Android & iOS Mobile Engineer at Yahoo (Verizon Media) Taiwan https://www.linkedin.com/in/hanruyeh/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store