Android如何獲取系統高度、標題欄和狀態欄高度

Rect rect = new Rect(); getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);///取得整個視圖部分,注意,若是你要設置標題樣式,這個必須出如今標題樣式以後,不然會出錯 int top = rect.top;////狀態欄的高度,因此rect.height,rect.width分別是系統的高度的寬度 Vi
相關文章
相關標籤/搜索