From a09887cbdecdc4d45c4964bcc9bccf1bc7870741 Mon Sep 17 00:00:00 2001 From: kangyuri1114 Date: Sun, 21 Apr 2024 03:04:01 +0900 Subject: [PATCH] =?UTF-8?q?[chore]:=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=99=B8=EB=B6=80=20=EC=9B=B9=20=EB=B7=B0=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=20=EC=9D=B4=EB=8F=99=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?-intent=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zucchini/projects/MypageFragment.kt | 35 +++++++++++++++++-- .../src/main/res/layout/fragment_mypage.xml | 27 +++++++------- .../projects/src/main/res/values/strings.xml | 2 ++ 3 files changed, 49 insertions(+), 15 deletions(-) diff --git a/feature/projects/src/main/java/com/zucchini/projects/MypageFragment.kt b/feature/projects/src/main/java/com/zucchini/projects/MypageFragment.kt index 0f9e8d2..437ceec 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/MypageFragment.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/MypageFragment.kt @@ -1,19 +1,48 @@ package com.zucchini.projects +import android.content.Intent +import android.net.Uri import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import com.zucchini.feature.projects.R +import com.zucchini.feature.projects.databinding.FragmentMypageBinding class MypageFragment : Fragment() { - + private var _binding: FragmentMypageBinding? = null + private val binding: FragmentMypageBinding get() = _binding!! override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?, - ): View? { - return inflater.inflate(R.layout.fragment_mypage, container, false) + ): View { + _binding = FragmentMypageBinding.inflate(inflater, container, false) + + navigateToWebDocs() + navigateToKakaoOpenChat() + return binding.root + } + + private fun navigateToWebDocs() { + binding.tvTermsOfUse.setOnClickListener { + val privacyRuleUrl = getString(R.string.service_docs_uri) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(privacyRuleUrl)) + startActivity(intent) + } + binding.tvPrivacyPolicy.setOnClickListener { + val privacyRuleUrl = getString(R.string.service_docs_uri) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(privacyRuleUrl)) + startActivity(intent) + } + } + + private fun navigateToKakaoOpenChat() { + binding.tvComplaint.setOnClickListener { + val kakaoOpenChatUrl = getString(R.string.tv_complaint_link) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(kakaoOpenChatUrl)) + startActivity(intent) + } } } diff --git a/feature/projects/src/main/res/layout/fragment_mypage.xml b/feature/projects/src/main/res/layout/fragment_mypage.xml index 607a46e..c3411d7 100644 --- a/feature/projects/src/main/res/layout/fragment_mypage.xml +++ b/feature/projects/src/main/res/layout/fragment_mypage.xml @@ -96,22 +96,23 @@ android:layout_marginStart="20dp" android:layout_marginBottom="20dp" android:fontFamily="@font/pretendardbold" + android:padding="10dp" android:text="@string/tv_terms_of_use" android:textColor="@color/olive_gray" android:textSize="15sp" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintBottom_toTopOf="@+id/divider1" /> + app:layout_constraintBottom_toTopOf="@+id/divider1" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toTopOf="@+id/tv_privacy_policy" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toTopOf="@+id/divider2" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toTopOf="@+id/tv_complaint" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> \ No newline at end of file diff --git a/feature/projects/src/main/res/values/strings.xml b/feature/projects/src/main/res/values/strings.xml index 857260d..507226b 100644 --- a/feature/projects/src/main/res/values/strings.xml +++ b/feature/projects/src/main/res/values/strings.xml @@ -29,4 +29,6 @@ 이용약관 개인정보 처리방침 신고하기 + https://coordinated-muskmelon-1dd.notion.site/c2d326eb516f48a48633bffa5df05936?pvs=4 + https://open.kakao.com/o/sDP9VYRb \ No newline at end of file