parent
f4626a7cd5
commit
196d5c6cfd
|
@ -4,7 +4,6 @@ import android.annotation.SuppressLint
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
import coil.transform.RoundedCornersTransformation
|
import coil.transform.RoundedCornersTransformation
|
||||||
|
@ -67,22 +66,6 @@ class LiveNowAdapter(
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.numberOfPeople - item.numberOfParticipate <= 2) {
|
|
||||||
binding.llRemainingParticipant.visibility = View.VISIBLE
|
|
||||||
if (item.numberOfPeople > item.numberOfParticipate) {
|
|
||||||
binding.tvRemainingParticipantNumber.visibility = View.VISIBLE
|
|
||||||
binding.tvRemainingParticipant.text = "잔여"
|
|
||||||
binding.tvRemainingParticipantNumber.text =
|
|
||||||
"${item.numberOfPeople - item.numberOfParticipate}"
|
|
||||||
} else {
|
|
||||||
binding.tvRemainingParticipantNumber.visibility = View.GONE
|
|
||||||
binding.tvRemainingParticipant.text = "Sold out"
|
|
||||||
binding.tvRemainingParticipantNumber.text = ""
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
binding.llRemainingParticipant.visibility = View.GONE
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.root.setOnClickListener { onClick(item) }
|
binding.root.setOnClickListener { onClick(item) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,42 +56,6 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_remaining_participant"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="3.3dp"
|
|
||||||
android:layout_marginBottom="11dp"
|
|
||||||
android:background="@drawable/bg_round_corner_13_3_b3333333"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingHorizontal="4dp"
|
|
||||||
android:paddingVertical="3dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tv_title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_remaining_participant"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
|
||||||
android:textColor="@color/color_eeeeee"
|
|
||||||
android:textSize="10sp"
|
|
||||||
tools:ignore="SmallSp"
|
|
||||||
tools:text="잔여" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_remaining_participant_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="2dp"
|
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
|
||||||
android:textColor="@color/color_3bb9f1"
|
|
||||||
android:textSize="10sp"
|
|
||||||
tools:ignore="SmallSp"
|
|
||||||
tools:text="3" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
Loading…
Reference in New Issue