| |
---|
| | userNameText.setText(uname); |
---|
| | |
---|
| | TextView profileText = findViewById(R.id.profileText); |
---|
| | |
---|
| | Button returnButton = findViewById(R.id.returnButton); |
---|
| | |
---|
| | //前の画面に戻る処理 |
---|
| | returnButton.setOnClickListener(new View.OnClickListener() { |
---|
| | @Override |
---|
| | public void onClick(View v) { |
---|
| | finish(); |
---|
| | } |
---|
| | }); |
---|
| | |
---|
| | Button followUserButton = findViewById(R.id.followUserButton); |
---|
| | |
---|
| | //閲覧しているユーザーページが自分のページならフォローボタンを非表示する |
---|
| | if (loginUid == uid) { |
---|
| | followUserButton.setVisibility(View.INVISIBLE); |
---|
| | } |
---|
| | |
---|
| | //ログインしているユーザーがフォローしているかの有無で画面表示時のボタンの文字を変更する |
---|
| | userPageViewModel.getFollows(loginUid); |
---|
| | userPageViewModel.getFollowJson().observe(this, new Observer<FollowJson>() { |
---|
| | userPageViewModel.getMyFollows(loginUid); |
---|
| | userPageViewModel.getMyFollowJson().observe(this, new Observer<FollowJson>() { |
---|
| | @Override |
---|
| | public void onChanged(@Nullable FollowJson followJson) { |
---|
| | followsUidList = followJson.getFollowUids(); |
---|
| | |
---|
| |
---|
| | |