diff --git a/app/src/main/java/com/shootit/greme/ui/fragment/SettingFragment.kt b/app/src/main/java/com/shootit/greme/ui/fragment/SettingFragment.kt index 0ad3a72..3b801fc 100644 --- a/app/src/main/java/com/shootit/greme/ui/fragment/SettingFragment.kt +++ b/app/src/main/java/com/shootit/greme/ui/fragment/SettingFragment.kt @@ -1,8 +1,10 @@ package com.shootit.greme.ui.fragment +import android.app.Activity import android.app.AlertDialog import android.content.Context import android.content.DialogInterface +import android.content.Intent import android.graphics.Color import android.os.Bundle import android.util.Log @@ -11,6 +13,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Toast +import androidx.core.app.ActivityOptionsCompat import androidx.core.content.ContextCompat import com.shootit.greme.R import com.shootit.greme.databinding.FragmentSettingBinding @@ -18,6 +21,7 @@ import com.shootit.greme.model.ChallengeData import com.shootit.greme.model.ResponseDateDiaryData import com.shootit.greme.network.ConnectionObject import com.shootit.greme.ui.adapter.ParticipatedChallengeAdapter +import com.shootit.greme.ui.view.SettingUserInfoActivity import retrofit2.Call import retrofit2.Callback import retrofit2.Response @@ -47,11 +51,21 @@ class SettingFragment : Fragment(R.layout.fragment_setting) { val root: View = binding.root initRecycler() binding.btnProfileModify.setOnClickListener { - val profileeditFragment = ProfileEditFragment() - requireActivity().supportFragmentManager - .beginTransaction() - .replace(R.id.nav_fl, profileeditFragment) - .commitNow() + + // profile setting 화면 이동 + // TODO transition animation 고민중... + Intent(binding.root.context, SettingUserInfoActivity::class.java).also { + //val pair: androidx.core.util.Pair = androidx.core.util.Pair(binding.btnProfileModify, "pageName") + //val optionPair = ActivityOptionsCompat.makeSceneTransitionAnimation(this@SettingFragment.activity as Activity, pair) + //startActivity(it, optionPair.toBundle()) + startActivity(it) + } + +// val profileeditFragment = ProfileEditFragment() +// requireActivity().supportFragmentManager +// .beginTransaction() +// .replace(R.id.nav_fl, profileeditFragment) +// .commitNow() } binding.btnLogout.setOnClickListener { val builder = AlertDialog.Builder(requireContext()) diff --git a/app/src/main/java/com/shootit/greme/ui/view/SettingUserInfoActivity.kt b/app/src/main/java/com/shootit/greme/ui/view/SettingUserInfoActivity.kt index 055bc0d..98cabc1 100644 --- a/app/src/main/java/com/shootit/greme/ui/view/SettingUserInfoActivity.kt +++ b/app/src/main/java/com/shootit/greme/ui/view/SettingUserInfoActivity.kt @@ -2,7 +2,9 @@ package com.shootit.greme.ui.view import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import android.view.View import androidx.activity.viewModels +import androidx.core.view.ViewCompat import androidx.lifecycle.ViewModel import com.shootit.greme.R import com.shootit.greme.base.BaseActivity @@ -11,6 +13,10 @@ import com.shootit.greme.repository.ChallengeRepository import com.shootit.greme.viewmodel.ChallengeInfoViewModel import com.shootit.greme.viewmodel.SettingUserInfoViewModel +/** + * 넘겨받는 데이터 : none + */ + class SettingUserInfoActivity : BaseActivity(R.layout.activity_setting_user_info) { override val viewModel by viewModels { SettingUserInfoViewModel.SettingUserInfoViewModelFactory( @@ -24,6 +30,7 @@ class SettingUserInfoActivity : BaseActivity(R.l } override fun onCreateAction() { + //ViewCompat.setTransitionName(binding.tvPageName, "pageName") } diff --git a/app/src/main/res/layout/activity_setting_user_info.xml b/app/src/main/res/layout/activity_setting_user_info.xml index f3cae20..c7476fa 100644 --- a/app/src/main/res/layout/activity_setting_user_info.xml +++ b/app/src/main/res/layout/activity_setting_user_info.xml @@ -9,10 +9,278 @@ type="com.shootit.greme.viewmodel.SettingUserInfoViewModel" /> - + android:layout_height="wrap_content"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +