팔로잉 리스트

- 팔로우 한 채널이 없는 경우 '팔로우 중인 채널이 없습니다.' 표시
This commit is contained in:
klaus 2024-09-02 18:01:18 +09:00
parent b7b73bb409
commit 6869cd62ea
3 changed files with 23 additions and 1 deletions

View File

@ -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
}
}
}
}

View File

@ -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

View File

@ -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"