Skip to content

Commit

Permalink
fix: Wrong icon tint in ActionItemView
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyDL-Infomaniak authored and KevinBoulongne committed Feb 3, 2025
1 parent 10ea97d commit 8329a95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Infomaniak Mail - Android
* Copyright (C) 2022-2024 Infomaniak Network SA
* Copyright (C) 2022-2025 Infomaniak Network SA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -48,9 +48,7 @@ class ActionItemView @JvmOverloads constructor(
attrs?.getAttributes(context, R.styleable.ActionItemView) {
with(binding) {
icon.setImageDrawable(getDrawable(R.styleable.ActionItemView_icon))
getColorStateList(R.styleable.ActionItemView_iconColor)?.let(::setIconTint) ?: run {
icon.imageTintList = AppCompatResources.getColorStateList(context, R.color.icon_button_primary_color)
}
getColorStateList(R.styleable.ActionItemView_iconColor)?.let(::setIconTint)

title.text = getString(R.styleable.ActionItemView_title)
getColorStateList(R.styleable.ActionItemView_titleColor)?.let(::setTitleColor)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/item_bottom_sheet_action.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorPrimary"
tools:src="@drawable/ic_afternoon_schedule" />

<TextView
Expand Down

0 comments on commit 8329a95

Please sign in to comment.