導航:首頁 > 操作系統 > android狀態欄高度0

android狀態欄高度0

發布時間:2023-06-10 18:26:40

『壹』 android 狀態欄高度是多少

是的,800高度里包括了狀態欄設計范圍應該是780高度。

『貳』 如何修改 Android 狀態欄高度

編譯 framework-res.apk 打開framework-res\res\values里的dimens.xml
搜索
name="status_bar_height">25.0dip
這一句是狀態欄的高度,把 25.0dip改成 36.0dip就是魅族狀態欄需要的寬度。
搜索
name="status_bar_icon_size">25.0dip
這句是 圖標的高度, 把 25.0dip改成18.dip 就是魅族狀態欄需要的寬度。
修改完回編譯framework-res.apk把resources.arsc替換回原來的framework-res.apk
把framework-res.apk替換到手機(注意修改許可權),重啟手機就完成了。

『叄』 如何修改 Android 狀態欄高度

修改 Android 狀態欄高度:
配置文件:frameworks/base/core/res/res/values/dimens.xml

修改條目:

<resources>
<!-- The width that is used when creating thumbnails of applications. -->
<dimen name="thumbnail_width">0dp</dimen>
<!-- The height that is used when creating thumbnails of applications. -->
<dimen name="thumbnail_height">0dp</dimen>
<!-- The standard size (both width and height) of an application icon that
will be displayed in the app launcher and elsewhere. -->
<dimen name="app_icon_size">48dip</dimen>
<dimen name="toast_y_offset">64dip</dimen>
<!-- Height of the status bar -->
<dimen name="status_bar_height">38dip</dimen>
<!-- Height of the status bar -->
<dimen name="status_bar_icon_size">38dip</dimen>
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<dimen name="status_bar_edge_ignore">5dp</dimen>
<!-- Size of the fastscroll hint letter -->
<dimen name="fastscroll_overlay_size">104dp</dimen>
<!-- Width of the fastscroll thumb -->
<dimen name="fastscroll_thumb_width">64dp</dimen>
<!-- Height of the fastscroll thumb -->
<dimen name="fastscroll_thumb_height">52dp</dimen>
<!-- Default height of a key in the password keyboard -->
<dimen name="password_keyboard_key_height">56dip</dimen>
<!-- Default correction for the space key in the password keyboard -->
<dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
</resources>

『肆』 android中怎麼計算標題欄高度

1、獲取標題欄高度:

getWindow().findViewById(Window.ID_ANDROID_CONTENT)這個方法獲取到的view就是程序不包括標題欄的部分,然後就可以知道標題欄的高度了。

java">intcontentTop=getWindow().findViewById(Window.ID_ANDROID_CONTENT).getTop();
//statusBarHeight是上面所求的狀態欄的高度
inttitleBarHeight=contentTop-statusBarHeight

擴展:

1、獲取狀態欄高度:

decorView是window中的最頂層view,可以從window中獲取到decorView,然後decorView有個getWindowVisibleDisplayFrame方法可以獲取到程序顯示的區域,包括標題欄,但不包括狀態欄。於是,我們就可以算出狀態欄的高度了。

Rectframe=newRect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
intstatusBarHeight=frame.top;

2、獲取屏幕高度

方法1:
WindowManagerwindowManager=getWindowManager();
Displaydisplay=windowManager.getDefaultDisplay();
screenWidth=display.getWidth();
screenHeight=display.getHeight();
方法2:
DisplayMetricsdm=newDisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(dm);//this指當前activity
screenWidth=dm.widthPixels;
screenHeight=dm.heightPixels;

『伍』 androidapp界面設計按什麼尺寸

androidapp界面設計是按720*1280的,切圖上可以點9切圖做到所有手機的適配。

狀態欄、導航欄和主菜單欄,以720*1280的尺寸來設計,那麼狀態欄的高度應為50px,導航欄的高度96px,主菜單欄的高度96px,因為是開源的系統,這里的數值也只能作為參考。

Android為了區別於IOS,從4.0開始提出了一套HOLO的UI風格設計風格,鼓勵將底部的主菜單欄放到導航欄下面,從而避免點擊下方材料誤點虛擬按鍵,很多APP的新版中也採用了這一風格。

(5)android狀態欄高度0擴展閱讀:

注意事項:

1、通常情況要定位一個Icon只需給出上/下邊距,左/右邊距,標注圖標距離只需標到可點擊范圍外

通用型顏色、字體單獨標明一份,通用型模塊只需單獨標明一份,如導航欄。

2、手機可視區域通常為寬度固定,長度超出邊界可滑動,所以標注物體寬度時可按比例說明,如果要標注內容上下居中,左右居中,或等比可不標注。

3、當交付的是一張完整圖片時,不需做機型適配,只需給高清圖(1920*1080)即可,注意進行壓縮

4、若圖標在不同頁面重復出現,且尺寸相差不大,直接給出最大一份切圖,並在圓形圖標明尺寸,程序會根據需求縮放。

5、當背景是純色時只需給出色值,Android使用16進制色值。

參考資料來源:網路-Android

參考資料來源:網路-界面設計

參考資料來源:網路-狀態欄

參考資料來源:網路-導航欄

參考資料來源:網路-開源系統

參考資料來源:網路-切圖

參考資料來源:網路-UI設計

閱讀全文

與android狀態欄高度0相關的資料

熱點內容
c51單片機數字鍾 瀏覽:905
apk文件反編譯後安裝包損壞 瀏覽:797
app圖標分別是什麼 瀏覽:349
linux全選命令 瀏覽:360
怎麼用華碩app 瀏覽:945
小明台灣通道加密 瀏覽:358
apriori演算法的java 瀏覽:699
jscanvas壓縮圖片 瀏覽:375
單片機與汽車單片機有何不同 瀏覽:955
獸醫雲平台伺服器 瀏覽:308
php循環字母 瀏覽:650
盛達是什麼APP 瀏覽:210
android計算屏幕高度 瀏覽:664
自己做紅包解壓球 瀏覽:486
pdf很貴嗎 瀏覽:506
如何搶購騰訊雲伺服器 瀏覽:400
電子書app源碼 瀏覽:881
程序員在上班的時候 瀏覽:406
游戲壓縮文件夾怎麼刪除 瀏覽:431
百度新聞app是什麼 瀏覽:900