class FirstViewModel: ViewModel() { // 外から値を流せないようにするために、mutableLiveDataはアクセス修飾子をprivateにしている。 private val mutableLiveData = MutableLiveData<String>)() val liveData: LiveData<String> = mutableLiveData fun tappedButton() { mutableLiveData.value = "Tapped Button!!" } } class FirstFragment : Fragment() { private val viewModel: FirstViewModel by lazy { ViewModelProvider.NewInstanceFactory().create(Fir