Skip to content

Commit

Permalink
[MOD/#58] �setOnSingleClickLinster 로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Eouls committed Sep 24, 2024
1 parent d9e9290 commit 7b3d57e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(R.layout.fragment_home) {
}

private fun goMatchResult() {
binding.layoutHomeMatchResult.setOnClickListener {
binding.layoutHomeMatchResult.setOnSingleClickListener {
viewModel.setNavigateEvent(R.id.about_lck_graph)
}
}

private fun goAboutLck() {
binding.ivHomeAboutLckBox.setOnClickListener {
binding.ivHomeAboutLckBox.setOnSingleClickListener {
viewModel.setNavigateEvent(R.id.about_lck_graph)
}
}

private fun goCommunity() {
binding.ivHomeCommunityBox.setOnClickListener {
binding.ivHomeCommunityBox.setOnSingleClickListener {
viewModel.setNavigateEvent(R.id.communityFragment)
}
}

private fun goViewingParty() {
binding.ivHomeViewingPartyBox.setOnClickListener {
binding.ivHomeViewingPartyBox.setOnSingleClickListener {
viewModel.setNavigateEvent(R.id.viewingPartyTab)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import umc.everyones.lck.R
import umc.everyones.lck.databinding.ItemHomeMatchContentBinding
import umc.everyones.lck.domain.model.response.home.HomeTodayMatchModel
import umc.everyones.lck.domain.model.todayMatch.LckMatch
import umc.everyones.lck.util.extension.setOnSingleClickListener
import umc.everyones.lck.util.extension.toOrdinal

class HomeMatchContentVPA(private val items: List<HomeTodayMatchModel.TodayMatchesModel>,
Expand Down Expand Up @@ -67,7 +68,7 @@ class HomeMatchContentVPA(private val items: List<HomeTodayMatchModel.TodayMatch
binding.ivHomeTodayMatchBar1.backgroundTintList = ColorStateList.valueOf(team1Color)
binding.ivHomeTodayMatchBar2.backgroundTintList = ColorStateList.valueOf(team2Color)

itemView.setOnClickListener {
itemView.setOnSingleClickListener {
onClick()
}
}
Expand All @@ -76,7 +77,7 @@ class HomeMatchContentVPA(private val items: List<HomeTodayMatchModel.TodayMatch
binding.layoutHomeNoMatch.visibility = View.VISIBLE
binding.layoutHomeMatchContainer.visibility = View.GONE

itemView.setOnClickListener {
itemView.setOnSingleClickListener {
onClick()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TodayMatchPredictionFragment : BaseFragment<FragmentTodayMatchPredictionBi
}

private fun goBackButton() {
binding.ivTodayMatchPredictionBack.setOnClickListener {
binding.ivTodayMatchPredictionBack.setOnSingleClickListener {
findNavController().navigateUp()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TodayMatchTodayPogFragment : BaseFragment<FragmentTodayMatchTodayPogBindin
}

private fun goBackButton() {
binding.ivTodayMatchTodayPogBack.setOnClickListener {
binding.ivTodayMatchTodayPogBack.setOnSingleClickListener {
findNavController().navigateUp()
}
}
Expand Down Expand Up @@ -154,27 +154,27 @@ class TodayMatchTodayPogFragment : BaseFragment<FragmentTodayMatchTodayPogBindin
viewModel.fetchTodayMatchVoteMatchPog(matchId)
}
private fun setupVoteImageViewClick() {
binding.ivTodayMatchTodayPog1stVote.setOnClickListener {
binding.ivTodayMatchTodayPog1stVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPog1stVote.visibility = View.GONE
binding.rvTodayMatchTodayPog1stVote.visibility = View.VISIBLE
}
binding.ivTodayMatchTodayPog2ndVote.setOnClickListener {
binding.ivTodayMatchTodayPog2ndVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPog2ndVote.visibility = View.GONE
binding.rvTodayMatchTodayPog2ndVote.visibility = View.VISIBLE
}
binding.ivTodayMatchTodayPog3rdVote.setOnClickListener {
binding.ivTodayMatchTodayPog3rdVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPog3rdVote.visibility = View.GONE
binding.rvTodayMatchTodayPog3rdVote.visibility = View.VISIBLE
}
binding.ivTodayMatchTodayPog4thVote.setOnClickListener {
binding.ivTodayMatchTodayPog4thVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPog4thVote.visibility = View.GONE
binding.rvTodayMatchTodayPog4thVote.visibility = View.VISIBLE
}
binding.ivTodayMatchTodayPog5thVote.setOnClickListener {
binding.ivTodayMatchTodayPog5thVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPog5thVote.visibility = View.GONE
binding.rvTodayMatchTodayPog5thVote.visibility = View.VISIBLE
}
binding.ivTodayMatchTodayPogMatchVote.setOnClickListener {
binding.ivTodayMatchTodayPogMatchVote.setOnSingleClickListener {
binding.ivTodayMatchTodayPogMatchVote.visibility = View.GONE
binding.rvTodayMatchTodayPogMatchVote.visibility = View.VISIBLE
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ class LckMatchContentRVA(private val items: List<TodayMatchInformationModel.Matc
binding.tvTodayMatchTeam1Bar.backgroundTintList = ColorStateList.valueOf(team1Color)
binding.tvTodayMatchTeam2Bar.backgroundTintList = ColorStateList.valueOf(team2Color)

// "POG 투표하기" 버튼 클릭 시 TodayMatchTodayPogFragment로 이동
// binding.tvTodayMatch1Pog.setOnClickListener {
// it.findNavController().navigate(R.id.todayMatchTodayPogFragment)
// }
// 팀 승률에 따라 승률 바의 비율을 설정
val team1WinRate = item.team1VoteRate / 100f
val team2WinRate = item.team2VoteRate / 100f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.bumptech.glide.Glide
import umc.everyones.lck.databinding.ItemTodayPogPlayerBinding
import umc.everyones.lck.domain.model.response.match.PogPlayerTodayMatchModel
import umc.everyones.lck.domain.model.todayMatch.TodayPog
import umc.everyones.lck.util.extension.setOnSingleClickListener

class TodayPogPlayerRVA(
private val onPlayerSelected: (Int) -> Unit // playerId를 전달하는 람다 함수
Expand Down Expand Up @@ -54,7 +55,7 @@ class TodayPogPlayerRVA(
binding.ivTodayPogPlayer.colorFilter = ColorMatrixColorFilter(matrix)
}
// 아이템 클릭 시 실행할 리스너 설정
binding.root.setOnClickListener {
binding.root.setOnSingleClickListener {
onItemClick()
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance.LCK.Light"
android:text="Viewing\nparty"
android:text="Viewing\nParty"
android:textColor="@color/white"
android:textSize="16sp"
android:layout_marginStart="12dp"
Expand Down

0 comments on commit 7b3d57e

Please sign in to comment.