【发布时间】:2023-03-29 15:06:02
【问题描述】:
我知道如何从 android LiveWallpaper 中检索标题栏的高度?
我知道如何从活动中做到这一点:Height of statusbar?:
Rect rectgle= new Rect();
Window window= getWindow();
window.getDecorView().getWindowVisibleDisplayFrame(rectgle);
int StatusBarHeight= rectgle.top;
int contentViewTop=
window.findViewById(Window.ID_ANDROID_CONTENT).getTop();
int TitleBarHeight= contentViewTop - StatusBarHeight;
Log.i("*** Jorgesys :: ", "StatusBar Height= " + StatusBarHeight + " , TitleBar Height = " + TitleBarHeight);
但是从WallpaperService.Engine,我不知道如何访问getWindow()。
谢谢。
【问题讨论】:
标签: android height live-wallpaper titlebar