mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-04-12 17:41:54 +02:00
Resources.getActionBarHeight() fix return style
Uses the same return style as in the other functions
This commit is contained in:
parent
b9b6b80120
commit
0ebbad7fff
@ -6,11 +6,10 @@ import android.util.TypedValue
|
|||||||
|
|
||||||
fun Resources.getActionBarHeight(context: Context): Int {
|
fun Resources.getActionBarHeight(context: Context): Int {
|
||||||
val tv = TypedValue()
|
val tv = TypedValue()
|
||||||
var height = 0
|
return if (context.theme.resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
|
||||||
if (context.theme.resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
|
TypedValue.complexToDimensionPixelSize(tv.data, displayMetrics)
|
||||||
height = TypedValue.complexToDimensionPixelSize(tv.data, displayMetrics)
|
} else
|
||||||
}
|
0
|
||||||
return height
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Resources.getStatusBarHeight(): Int {
|
fun Resources.getStatusBarHeight(): Int {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user