Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mod] 각종 이슈 해결 (마이페이지 스크롤뷰, 버튼 ripple 제거, 상세페이지 이미지 문제 해결) #58

Merged
merged 7 commits into from
Jul 20, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import com.sopt.geonppang.util.CustomSnackbar

class DetailBakeryInfoAdapter :
RecyclerView.Adapter<DetailBakeryInfoAdapter.DetailBakeryInfoViewHolder>() {
private var bakeryInfo: BakeryInfo? = null
private val bakeryInfoList: MutableList<BakeryInfo> = mutableListOf()

class DetailBakeryInfoViewHolder(val binding: ItemDetailBakeryInfoBinding) :
RecyclerView.ViewHolder(binding.root) {
fun onBind() {
fun onBind(
bakeryInfo: BakeryInfo
) {
with(binding) {
binding.bakeryInfo = bakeryInfo
ivItemDetailBakeryInfoBookmark.setOnClickListener {
CustomSnackbar.makeSnackbar(
it,
Expand All @@ -39,15 +42,15 @@ class DetailBakeryInfoAdapter :
return DetailBakeryInfoViewHolder(binding)
}

override fun getItemCount(): Int = 1
override fun getItemCount(): Int = bakeryInfoList.size

override fun onBindViewHolder(holder: DetailBakeryInfoViewHolder, position: Int) {
holder.binding.bakeryInfo = bakeryInfo
holder.onBind()
holder.onBind(bakeryInfoList[position])
}

fun setBakeryInfo(bakeryInfo: BakeryInfo) {
this.bakeryInfo = bakeryInfo
bakeryInfoList.clear()
bakeryInfoList.add(bakeryInfo)
notifyDataSetChanged()
}
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_signup_email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
app:layout_constraintEnd_toEndOf="@id/gl_end"
app:layout_constraintStart_toStartOf="@id/gl_start"
app:layout_constraintTop_toBottomOf="@id/linear_email"
app:rippleColor="@color/white"
app:strokeColor="@{viewModel.isValidEmail() == true ? @color/main_2 : @color/gray_300}" />

<com.google.android.material.button.MaterialButton
Expand Down
Loading