diff --git a/app/src/main/java/com/example/nemophila/MyPageActivity.java b/app/src/main/java/com/example/nemophila/MyPageActivity.java index d32f433..a2f9074 100644 --- a/app/src/main/java/com/example/nemophila/MyPageActivity.java +++ b/app/src/main/java/com/example/nemophila/MyPageActivity.java @@ -19,12 +19,12 @@ import com.example.nemophila.viewmodels.AccountViewModel; public class MyPageActivity extends AppCompatActivity { - +//MyPageActivity画面の作成 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_mypage); - +//ボタンを押した場合の画面遷移 Button friendButton = (Button) findViewById(R.id.friend); friendButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { @@ -56,12 +56,13 @@ startActivity(intent); } }); - +//AccountViewModelとの通信とテキストの表示 AccountViewModel accountViewModel = new ViewModelProvider(this).get(AccountViewModel.class); - TextView name = (TextView) findViewById(R.id.name); - TextView id = (TextView) findViewById(R.id.id); -// accountViewModel.getAccountLiveData().observe(this, new Observer() { -// -// }); + Nemophila nemophila = (Nemophila) getApplication(); + String uid = nemophila.getUid(); +// String name = nemophila. +// TextView name = (TextView) findViewById(R.id.name); +// TextView id = (TextView) findViewById(R.id.id); + } } \ No newline at end of file