refactor: use isVisible instead visibility #113

Closed
septs wants to merge 2 commits from septs:is-visible into master
Contributor
public inline var View.isVisible: Boolean
    get() = visibility == View.VISIBLE
    set(value) {
        visibility = if (value) View.VISIBLE else View.GONE
    }

References

```kotlin public inline var View.isVisible: Boolean get() = visibility == View.VISIBLE set(value) { visibility = if (value) View.VISIBLE else View.GONE } ``` ## References - https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).isVisible()
septs force-pushed is-visible from 21e698520e to 591d331c3a 2024-12-13 14:22:52 +01:00 Compare
septs changed title from refactor: use isVisible replace visibility to refactor: use isVisible instead visibility 2024-12-13 17:42:01 +01:00
septs force-pushed is-visible from 591d331c3a to 4fb2b80ff9 2024-12-13 20:57:36 +01:00 Compare
septs added 1 commit 2024-12-14 14:55:54 +01:00
Owner

isVisible is NOT the same as View visibility because visibility can be either VISIBLE, INVISIBLE, or GONE, which all behave very differently. I prefer to use View.GONE explicitly.

isVisible is NOT the same as View visibility because visibility can be either `VISIBLE`, `INVISIBLE`, or `GONE`, which all behave __very__ differently. I prefer to use `View.GONE` explicitly.
PeterCxy closed this pull request 2024-12-15 02:40:17 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PeterCxy/OpenEUICC#113
No description provided.