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
{{#tags}}- {{label}}
{{/tags}}