diff --git a/feature/projects/src/main/java/com/zucchini/projects/developer/DevInfoFragment.kt b/feature/projects/src/main/java/com/zucchini/projects/developer/DevInfoFragment.kt index 97f8b80..3e2ba32 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/developer/DevInfoFragment.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/developer/DevInfoFragment.kt @@ -1,7 +1,5 @@ package com.zucchini.projects.developer -import android.content.Intent -import android.net.Uri import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -13,7 +11,6 @@ import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager import com.zucchini.domain.model.KeywordList -import com.zucchini.feature.projects.R import com.zucchini.feature.projects.databinding.FragmentDevInfoBinding import com.zucchini.projects.adapter.PageIndicatorAdapter import com.zucchini.projects.developer.adapter.DeveloperInfoAdapter @@ -43,7 +40,6 @@ class DevInfoFragment : Fragment() { initKeywordAdapter() initDeveloperAdapter() initPageIndicator() - navigateToSubmitForms() collectDevelopersList() observePageChanges() @@ -114,14 +110,6 @@ class DevInfoFragment : Fragment() { } } - private fun navigateToSubmitForms() { - binding.floatingActionButton.setOnClickListener { - val developerFormUri = getString(R.string.developer_form) - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(developerFormUri)) - startActivity(intent) - } - } - override fun onDestroyView() { super.onDestroyView() _binding = null diff --git a/feature/projects/src/main/java/com/zucchini/projects/mypage/MypageFragment.kt b/feature/projects/src/main/java/com/zucchini/projects/mypage/MypageFragment.kt index f4d0f4e..0060e42 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/mypage/MypageFragment.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/mypage/MypageFragment.kt @@ -29,12 +29,12 @@ class MypageFragment : Fragment() { private fun navigateToWebDocs() { binding.tvTermsOfUse.setOnClickListener { - val privacyRuleUrl = getString(R.string.service_docs_uri) - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(privacyRuleUrl)) + val serviceUsePolicy = getString(R.string.service_use_docs_uri) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(serviceUsePolicy)) startActivity(intent) } binding.tvPrivacyPolicy.setOnClickListener { - val privacyRuleUrl = getString(R.string.service_docs_uri) + val privacyRuleUrl = getString(R.string.privacy_docs_uri) val intent = Intent(Intent.ACTION_VIEW, Uri.parse(privacyRuleUrl)) startActivity(intent) } diff --git a/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectDetailActivity.kt b/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectDetailActivity.kt index b5cbc9d..d2db3e1 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectDetailActivity.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectDetailActivity.kt @@ -146,6 +146,9 @@ class ProjectDetailActivity : AppCompatActivity() { } navigateToProjectGithubLink(projectGithubLink) + navigateToProjectLandingPageLink(it?.infoPageLink) + navigateToProjectAppLink(it?.appLink) + navigateToProjectWebLink(it?.webLink) } } @@ -158,4 +161,31 @@ class ProjectDetailActivity : AppCompatActivity() { startActivity(intent) } } + + private fun ActivityProjectDetailBinding.navigateToProjectLandingPageLink( + projectLandingPageLink: String?, + ) { + tvLandingLink.setOnClickListener { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(projectLandingPageLink)) + startActivity(intent) + } + } + + private fun ActivityProjectDetailBinding.navigateToProjectAppLink( + projectAppLink: String?, + ) { + tvAppLink.setOnClickListener { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(projectAppLink)) + startActivity(intent) + } + } + + private fun ActivityProjectDetailBinding.navigateToProjectWebLink( + projectWebLink: String?, + ) { + tvWebLink.setOnClickListener { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(projectWebLink)) + startActivity(intent) + } + } } diff --git a/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectsFragment.kt b/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectsFragment.kt index 0d1bec1..205d434 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectsFragment.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/projects/ProjectsFragment.kt @@ -1,5 +1,7 @@ package com.zucchini.projects.projects +import android.content.Intent +import android.net.Uri import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -10,6 +12,7 @@ import androidx.fragment.app.viewModels import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.LinearLayoutManager +import com.zucchini.core.designsystem.R import com.zucchini.domain.model.KeywordList import com.zucchini.domain.model.SortOption import com.zucchini.feature.projects.databinding.FragmentProjectsBinding @@ -49,6 +52,7 @@ class ProjectsFragment : Fragment() { collectPageState() collectProjectList() searchWithSearchString() + initSubmitProjectButton() return binding.root } @@ -151,6 +155,15 @@ class ProjectsFragment : Fragment() { searchKeywordAdapter.submitList(KeywordList.searchKeyword) } + + private fun initSubmitProjectButton() { + binding.floatingActionButton.setOnClickListener { + val projectFormUri = getString(com.zucchini.feature.projects.R.string.project_form) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(projectFormUri)) + startActivity(intent) + } + } + override fun onDestroyView() { super.onDestroyView() _binding = null diff --git a/feature/projects/src/main/java/com/zucchini/projects/projects/adapter/ProjectDetailDevAdapter.kt b/feature/projects/src/main/java/com/zucchini/projects/projects/adapter/ProjectDetailDevAdapter.kt index 011f282..9fbc8d3 100644 --- a/feature/projects/src/main/java/com/zucchini/projects/projects/adapter/ProjectDetailDevAdapter.kt +++ b/feature/projects/src/main/java/com/zucchini/projects/projects/adapter/ProjectDetailDevAdapter.kt @@ -1,11 +1,14 @@ package com.zucchini.projects.projects.adapter +import android.content.Intent import android.view.LayoutInflater import android.view.ViewGroup +import androidx.core.content.ContextCompat import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView import com.zucchini.domain.model.ProjectsDetailModel import com.zucchini.feature.projects.databinding.ItemProjectDetailDevBinding +import com.zucchini.projects.developer.DevDetailActivity import com.zucchini.view.ItemDiffCallback class ProjectDetailDevAdapter : @@ -40,6 +43,12 @@ class ProjectDetailDevAdapter : tvDeveloperInfo1.text = developerListInProjectDetail.partList[0] ?: "" tvDeveloperInfo2.text = developerListInProjectDetail.partList[1] ?: "" } + + root.setOnClickListener { + val intent = Intent(binding.root.context, DevDetailActivity::class.java) + intent.putExtra("developerId", developerListInProjectDetail.id) + ContextCompat.startActivity(binding.root.context, intent, null) + } } } } diff --git a/feature/projects/src/main/res/layout/fragment_dev_info.xml b/feature/projects/src/main/res/layout/fragment_dev_info.xml index b981e34..e4944a7 100644 --- a/feature/projects/src/main/res/layout/fragment_dev_info.xml +++ b/feature/projects/src/main/res/layout/fragment_dev_info.xml @@ -63,15 +63,4 @@ app:layout_constraintStart_toStartOf="parent" tools:listitem="@layout/item_page_indicator" /> - \ 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 b27d509..7ab5cc0 100644 --- a/feature/projects/src/main/res/values/strings.xml +++ b/feature/projects/src/main/res/values/strings.xml @@ -29,8 +29,9 @@ 이용약관 개인정보 처리방침 신고하기 - https://coordinated-muskmelon-1dd.notion.site/c2d326eb516f48a48633bffa5df05936?pvs=4 - https://open.kakao.com/o/sDP9VYRb + https://www.notion.so/c2d326eb516f48a48633bffa5df05936?pvs=4 + https://www.notion.so/c223b37f5ba44f05b162bf9c3f463ea5?pvs=4 + https://open.kakao.com/o/gnLnw8pg https://forms.gle/UsAn9zX74vrJYxG37 https://forms.gle/3rsgKP3UFLPySJBFA https://github.com/