-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[feat/#22-web-notion-mypage]: 마이페이지 외부 웹 뷰 링크 이동 구현 -intent 구현
- Loading branch information
Showing
3 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
35 changes: 32 additions & 3 deletions
35
feature/projects/src/main/java/com/zucchini/projects/MypageFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters