diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java index 8fb2246..88e72f5 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java @@ -20,6 +20,8 @@ import org.ntlab.acanthus_client.views.main_menu_ui.mypage.logout.LogoutActivity; import org.ntlab.acanthus_client.views.main_menu_ui.mypage.others.PrivacyPolicyActivity; import org.ntlab.acanthus_client.views.main_menu_ui.mypage.others.TermsOfServiceActivity; +import org.ntlab.acanthus_client.views.userpage.followList.FollowListActivity; +import org.ntlab.acanthus_client.views.userpage.followerList.FollowerListActivity; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -48,6 +50,8 @@ @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); + onClickFollow(view); + onClickFollower(view); onClickAccept(view); onClickAnimation(view); onClickAppInformation(view); @@ -68,6 +72,26 @@ //----------------------------------------------------------------- // + public void onClickFollow(View view) { + Button button = view.findViewById(R.id.followListButton); + + button.setOnClickListener(v -> { + transitionFollowListActivity(); + }); + } + + //----------------------------------------------------------------- + // + public void onClickFollower(View view) { + Button button = view.findViewById(R.id.followerListButton); + + button.setOnClickListener(v -> { + transitionFollowerListActivity(); + }); + } + + //----------------------------------------------------------------- + // public void onClickAccept(View view) { Button buttonIsInvited = view.findViewById(org.ntlab.acanthus_client.R.id.buttonIsInvited); @@ -151,6 +175,8 @@ // init private void init() { Acanthus acanthus = (Acanthus) getActivity().getApplication(); + TextView loginNameText = binding.textMyname; + loginNameText.setText(acanthus.getPreferenceName()); mypageViewModel = new ViewModelProvider(this).get(MyPageViewModel.class); mypageViewModel.init(acanthus); startObserve(); @@ -194,6 +220,24 @@ //----------------------------------------------------------------- // + public void transitionFollowListActivity() { + Acanthus acanthus = (Acanthus) getActivity().getApplication(); + Intent intent = new Intent(acanthus, FollowListActivity.class); + intent.putExtra("UID", acanthus.getPreferenceUid()); + startActivity(intent); + } + + //----------------------------------------------------------------- + // + public void transitionFollowerListActivity() { + Acanthus acanthus = (Acanthus) getActivity().getApplication(); + Intent intent = new Intent(acanthus, FollowerListActivity.class); + intent.putExtra("UID", acanthus.getPreferenceUid()); + startActivity(intent); + } + + //----------------------------------------------------------------- + // private void transitionAnimationActivity() { Acanthus acanthus = (Acanthus) getActivity().getApplication(); Intent intent = new Intent(acanthus, AnimationActivity.class);