Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
kpmmmurphy committed Apr 2, 2021
2 parents 9580c02 + cdeee38 commit 86e84e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## 7.0.1 - 05/02/2021
* updated navigation_bar height getter.

## 7.0.0 - 27/01/2021
* Added support in Dialog.

Expand Down
7 changes: 6 additions & 1 deletion alerter/src/main/java/com/tapadoo/alerter/Alert.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ class Alert @JvmOverloads constructor(context: Context,

val layoutContainer: View? by lazy { findViewById<View>(R.id.vAlertContentContainer) }

private val navigationBarHeight by lazy {
val dimenId = resources.getIdentifier("navigation_bar_height", "dimen", "android")
resources.getDimensionPixelSize(dimenId)
}

init {
inflate(context, R.layout.alerter_alert_view, this)

Expand Down Expand Up @@ -155,7 +160,7 @@ class Alert @JvmOverloads constructor(context: Context,

(layoutParams as MarginLayoutParams).apply {
if (layoutGravity != Gravity.TOP) {
bottomMargin = getDimenPixelSize(R.dimen.navigation_bar_height)
bottomMargin = navigationBarHeight
}
}

Expand Down
3 changes: 0 additions & 3 deletions alerter/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
<dimen name="alerter_text_medium">18sp</dimen>
<dimen name="alerter_alert_view_padding_top">70dp</dimen>

<!--Display sizes-->
<dimen name="navigation_bar_height">48dp</dimen>

</resources>

0 comments on commit 86e84e2

Please sign in to comment.