mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-28 14:24:12 +00:00
Android: Don't draw the UI under the system bars or the keyboard
This commit is contained in:
parent
c31b621cb5
commit
fb78bbd702
2 changed files with 93 additions and 24 deletions
|
@ -6,6 +6,7 @@ import android.view.inputmethod.EditorInfo;
|
|||
import android.view.inputmethod.InputConnection;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Rect;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.app.Activity;
|
||||
import android.widget.FrameLayout;
|
||||
|
@ -194,4 +195,11 @@ public class SlintAndroidJavaHelper {
|
|||
int nightModeFlags = mActivity.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
return nightModeFlags == Configuration.UI_MODE_NIGHT_YES;
|
||||
}
|
||||
|
||||
// Get the geometry of the view minus the system bars and the keyboard
|
||||
public Rect get_view_rect() {
|
||||
Rect rect = new Rect();
|
||||
mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue