mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/4704 (https://github.com/mozilla-mobile/fenix/pull/4728)
* Fixes https://github.com/mozilla-mobile/fenix/issues/4704. Overrides `setEnabled` for DeleteBrowsingDataItem to change view alpha when disabled and to toggle the checkbox `isEnabled` behavior based on the value provided. * Updates CHANGELOG.md * Removes unnecessary disabling of checkbox in DeleteBrowsingDataItem.kt Updates CHANGELOG.md to reflect the component changed.
This commit is contained in:
parent
43e4bcc0b1
commit
f3a412e24e
@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
|
- #4704 - Adds ability to show a different alpha when no elements available to be deleted for a delete browsing data item
|
||||||
- #4137 - Adds pagination to the history view
|
- #4137 - Adds pagination to the history view
|
||||||
- #3695 - Made search suggestions for other tabs clickable
|
- #3695 - Made search suggestions for other tabs clickable
|
||||||
|
|
||||||
|
@ -19,6 +19,11 @@ class DeleteBrowsingDataItem @JvmOverloads constructor(
|
|||||||
defStyleAttr: Int = 0
|
defStyleAttr: Int = 0
|
||||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
private const val ENABLED_ALPHA = 1f
|
||||||
|
private const val DISABLED_ALPHA = 0.6f
|
||||||
|
}
|
||||||
|
|
||||||
val titleView: TextView
|
val titleView: TextView
|
||||||
get() = title
|
get() = title
|
||||||
|
|
||||||
@ -61,4 +66,9 @@ class DeleteBrowsingDataItem @JvmOverloads constructor(
|
|||||||
subtitle.text = resources.getString(subtitleId)
|
subtitle.text = resources.getString(subtitleId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun setEnabled(enabled: Boolean) {
|
||||||
|
super.setEnabled(enabled)
|
||||||
|
alpha = if (enabled) ENABLED_ALPHA else DISABLED_ALPHA
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user