We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45b100a commit fa670b1Copy full SHA for fa670b1
uhabits-android/src/main/java/org/isoron/uhabits/activities/habits/list/views/HabitCardView.kt
@@ -234,9 +234,15 @@ class HabitCardView(
234
val containerLocation = IntArray(2)
235
this.getLocationOnScreen(containerLocation)
236
val relButtonLocation = getRelativeButtonLocation(timestamp)
237
+ val windowInsets = rootWindowInsets
238
+ val statusBarHeight = if (SDK_INT <= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
239
+ windowInsets?.systemWindowInsetTop ?: 0
240
+ } else {
241
+ 0
242
+ }
243
return PointF(
244
containerLocation[0].toFloat() + relButtonLocation.x,
- containerLocation[1].toFloat() - relButtonLocation.y
245
+ containerLocation[1].toFloat() + relButtonLocation.y - statusBarHeight
246
)
247
}
248
0 commit comments