Skip to content

Commit

Permalink
[Fix]: 首页高度预估
Browse files Browse the repository at this point in the history
  • Loading branch information
why committed Dec 23, 2023
1 parent 1c02c82 commit d80952c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ class OverviewEpBinder(
holder.binding.tvTitleEp.title = item.title

item.entity.forceCast<MediaDetailEntity>().apply {
holder.binding.epGrid.isVisible = MediaType.canEditEpProgress(mediaType)
holder.binding.vHolder.isVisible = MediaType.canEditEpProgress(mediaType) && isFirstBind
val canEditEpProgress = MediaType.canEditEpProgress(mediaType)

holder.binding.epGrid.isVisible = canEditEpProgress
holder.binding.vHolder.isVisible = canEditEpProgress && isFirstBind

holder.binding.pb1.bind(this, true, clickAddEpProgress)
holder.binding.pb2.bind(this, false, clickAddEpProgress)

holder.binding.ivLocation.isVisible = EpGridView.isHorizontalGrid(epList.size)
holder.binding.ivLocation.isVisible =
canEditEpProgress && EpGridView.isHorizontalGrid(epList.size)

holder.binding.ivLocation.setOnFastLimitClickListener {
holder.binding.epGrid.scrollToWatched()
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_home_banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<com.xiaoyv.common.widget.scroll.AnimeRecyclerView
android:id="@+id/rv_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/ui_size_180"
android:layout_marginTop="@dimen/ui_layout_margin"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
Expand All @@ -23,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/ui_size_24"
android:minHeight="@dimen/ui_size_200"
android:nestedScrollingEnabled="false"
android:orientation="vertical"
android:paddingHorizontal="@dimen/ui_size_8"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/fragment_home_banner_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/ui_size_180"
android:layout_marginHorizontal="@dimen/ui_size_8">
android:layout_height="match_parent"
android:layout_marginHorizontal="@dimen/ui_size_8"
tools:showIn="@layout/fragment_home_banner">

<com.xiaoyv.common.widget.image.AnimeImageView
android:id="@+id/iv_cover"
Expand Down

0 comments on commit d80952c

Please sign in to comment.