Skip to content

Commit 39e4c84

Browse files
committed
Working on Activity
1 parent 0797c49 commit 39e4c84

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Sources/AppCompatActivity.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ open class SwiftSupportAppCompatActivity: AndroidContextWrapper {
7272
}
7373
}
7474

75+
public var actionBarHeighPixels: Int {
76+
get {
77+
return getActionBarHeighPixels()
78+
}
79+
}
80+
7581
// MARK: - Listener
7682

7783
open func onCreate(savedInstanceState: Android.OS.Bundle?) {
@@ -488,6 +494,24 @@ open class SwiftSupportAppCompatActivity: AndroidContextWrapper {
488494
return Int(__return)
489495
}
490496

497+
@inline(__always)
498+
private func getActionBarHeighPixels() -> Int {
499+
500+
var __locals = [jobject]()
501+
502+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
503+
504+
let __return = JNIMethod.CallIntMethod(
505+
object: javaObject,
506+
methodName: "getActionBarHeighPixels",
507+
methodSig: "()I",
508+
methodCache: &SwiftActivityJNICache.MethodID.getActionBarHeighPixels,
509+
args: &__args,
510+
locals: &__locals )
511+
512+
return Int(__return)
513+
}
514+
491515
@inline(__always)
492516
private func hasNavBarJavaMethod() -> Bool {
493517

@@ -618,6 +642,7 @@ fileprivate extension SwiftSupport.App.AppCompatActivity {
618642
static var getWindowManager: jmethodID?
619643
static var getStatusBarHeightPixels: jmethodID?
620644
static var hasNavBar: jmethodID?
645+
static var getActionBarHeighPixels: jmethodID?
621646
}
622647
}
623648
}

0 commit comments

Comments
 (0)