diff --git a/app/src/main/java/com/example/nemophila/MyPageActivity.java b/app/src/main/java/com/example/nemophila/MyPageActivity.java index 5ebf6f5..747be89 100644 --- a/app/src/main/java/com/example/nemophila/MyPageActivity.java +++ b/app/src/main/java/com/example/nemophila/MyPageActivity.java @@ -64,10 +64,9 @@ }); //AccountViewModelとの通信とテキストの表示 AccountViewModel accountViewModel = new ViewModelProvider(this).get(AccountViewModel.class); - accountViewModel.getAccountLiveData().observe(this, new Observer () { + accountViewModel.getNameLiveData().observe(this, new Observer () { @Override - public void onChanged(Account account) { - String name = account.getName(); + public void onChanged(String name) { TextView myName = (TextView) findViewById(R.id.name); myName.setText(name); nemophila.setName(name);