parent
b7b73bb409
commit
6869cd62ea
|
@ -104,6 +104,14 @@ class FollowingCreatorActivity : BaseActivity<ActivityFollowingCreatorBinding>(
|
|||
|
||||
viewModel.creatorListTotalCountLiveData.observe(this) {
|
||||
binding.tvTotalCount.text = " $it "
|
||||
|
||||
if (it > 0) {
|
||||
binding.tvNone.visibility = View.GONE
|
||||
binding.rvFollowingCreator.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.tvNone.visibility = View.VISIBLE
|
||||
binding.rvFollowingCreator.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class FollowingCreatorViewModel(
|
|||
val creatorListLiveData: LiveData<List<GetCreatorFollowingAllListItem>>
|
||||
get() = _creatorListLiveData
|
||||
|
||||
private val _creatorListTotalCountLiveData = MutableLiveData<Int>()
|
||||
private val _creatorListTotalCountLiveData = MutableLiveData(0)
|
||||
val creatorListTotalCountLiveData: LiveData<Int>
|
||||
get() = _creatorListTotalCountLiveData
|
||||
|
||||
|
|
|
@ -53,6 +53,20 @@
|
|||
android:layout_marginTop="13.3dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="13.3dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_total_count" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_none"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="13.3dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:gravity="center"
|
||||
android:text="팔로우 중인 채널이 없습니다."
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
Loading…
Reference in New Issue