Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
android:theme="@style/Theme.BangWool"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".ui.mypage.EditPrivacyActivity"
android:exported="false" />
<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="oauth"
android:scheme="${KAKAO_KEY}" />
Expand All @@ -34,6 +39,7 @@
android:theme="@style/Theme.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand All @@ -46,23 +52,19 @@
<activity
android:name=".ui.login.FindPasswordActivity"
android:exported="false" />

<activity android:name=".ui.login.RegisterActivity" />
<activity android:name=".ui.login.PrivacyPolicyActivity" />
<activity android:name=".ui.login.TermsAgreeActivity" />
<activity android:name=".ui.login.UsePolicyActivity" />
>
<activity
android:name=".MainActivity"
android:exported="false" />

<activity
android:name=".ui.home.TimerActivity"
android:exported="false" />
<activity
android:name=".ui.home.TimerEditActivity"
android:exported="false" />

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.bangwool.ui.mypage

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.example.bangwool.R
import com.example.bangwool.databinding.ActivityEditPrivacyBinding
import com.example.bangwool.databinding.ActivityTimerBinding

class EditPrivacyActivity : AppCompatActivity() {
lateinit var binding: ActivityEditPrivacyBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityEditPrivacyBinding.inflate(layoutInflater)
binding.icBack.setOnClickListener{
finish()
}
val nickname = intent.getStringExtra("nickname")
val profileImage = intent.getStringExtra("profileImage")
val email = intent.getStringExtra("email")
binding.tvNickname.text = nickname
binding.tvEmail.text = email

binding.btnEditPasswordBefore.setOnClickListener{
binding.btnEditPasswordBefore.visibility = View.GONE
binding.clPassword.visibility = View.VISIBLE
binding.clCheckPassword.visibility = View.VISIBLE
binding.btnEditPasswordAfter.visibility = View.VISIBLE
binding.svMyInfo.isScrollbarFadingEnabled = false
}

setContentView(binding.root)
}
}
16 changes: 14 additions & 2 deletions app/src/main/java/com/example/bangwool/ui/mypage/MyPageFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.example.bangwool.retrofit.MyPageResponse
import com.example.bangwool.retrofit.RetrofitInterface
import com.example.bangwool.retrofit.RetrofitUtil
import com.example.bangwool.retrofit.removeAccessToken
import com.example.bangwool.ui.home.TimerEditActivity
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
Expand All @@ -28,6 +29,9 @@ class MyPageFragment : Fragment() {

lateinit var binding: FragmentMypageBinding
private lateinit var retrofitInterface: RetrofitInterface
lateinit var nickname: String
lateinit var profileImage: String
lateinit var email: String

override fun onCreateView(
inflater: LayoutInflater,
Expand Down Expand Up @@ -70,15 +74,23 @@ class MyPageFragment : Fragment() {
binding.appinfoMenu.setOnClickListener {
UpdateDialogUtils.showUpdateDialog(requireContext())
}
binding.myinfo.setOnClickListener {
val i = Intent(requireContext(), EditPrivacyActivity::class.java)
i.putExtra("nickname", nickname)
i.putExtra("profileImage", profileImage)
i.putExtra("email", email)
startActivity(i)
}
}

private fun fetchMyPageData() {
RetrofitUtil.getRetrofit().getMyPage().enqueue(object : Callback<MyPageResponse> {
override fun onResponse(call: Call<MyPageResponse>, response: Response<MyPageResponse>) {
if (response.isSuccessful) {
val myPageResponse = response.body()!!
val nickname = myPageResponse.nickname
val profileImage = myPageResponse.profileImage
nickname = myPageResponse.nickname
profileImage = myPageResponse.profileImage
email = myPageResponse.email


// 닉네임 업데이트 부분
Expand Down
Loading