Skip to content

Commit ecd8f8b

Browse files
authored
Fix: Styling fixes on white theme for hero banner #2409 (Part 2)
1 parent 51ab4bf commit ecd8f8b

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeParentItemAdapterPreview.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ class HomeParentItemAdapterPreview(
387387
populateChips(
388388
homePreviewTags,
389389
item.tags?.take(6) ?: emptyList(),
390-
R.style.ChipFilledSemiTransparent
390+
R.style.ChipFilledSemiTransparent,
391+
null
391392
)
392393

393394

app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ object UIHelper {
103103
fun populateChips(
104104
view: ChipGroup?,
105105
tags: List<String>,
106-
@StyleRes style: Int = R.style.ChipFilled
106+
@StyleRes style: Int = R.style.ChipFilled,
107+
@AttrRes textColor: Int? = R.attr.white,
107108
) {
108109
if (view == null) return
109110
view.removeAllViews()
@@ -124,7 +125,9 @@ object UIHelper {
124125
chip.isCheckable = false
125126
chip.isFocusable = false
126127
chip.isClickable = false
127-
chip.setTextColor(context.colorFromAttribute(R.attr.white))
128+
textColor?.let {
129+
chip.setTextColor(context.colorFromAttribute(it))
130+
}
128131
view.addView(chip)
129132
}
130133
}

app/src/main/res/layout/fragment_home_head_tv.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979

8080

8181
<TextView
82+
android:textColor="@color/textColor"
8283
android:id="@+id/home_preview_text"
8384
android:layout_width="match_parent"
8485
android:layout_height="wrap_content"
@@ -136,6 +137,7 @@
136137
android:maxLines="3"
137138
android:paddingBottom="5dp"
138139
android:textSize="15sp"
140+
android:textColor="@color/textColor"
139141
tools:text="very nice tv series" />
140142

141143
<TextView

app/src/main/res/values/styles.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@
113113

114114
<style name="ChipFilledSemiTransparent" parent="@style/ChipFilled">
115115
<item name="chipBackgroundColor">@color/transparent</item>
116-
<item name="chipSurfaceColor">@color/white_attr_20</item>
116+
<item name="chipSurfaceColor">#33FFFFFF</item>
117117
<item name="backgroundColor">@color/transparent</item>
118+
<item name="android:textColor">@color/textColor</item>
119+
<item name="textColor">@color/textColor</item>
118120
</style>
119121

120122
<style name="ChipParent">

0 commit comments

Comments
 (0)