导航:首页 > 操作系统 > android状态栏大小

android状态栏大小

发布时间:2025-07-08 01:44:44

android app 界面设计按什么尺寸

android app 界面设计是按720*1280的,切图上可以点9切图做到所有手机的适配。

状态栏、导航栏和主菜单栏,以720*1280的尺寸来设计,那么状态栏的高度应为50px,导航栏的高度96px,主菜单栏的高度96px,因为是开源的系统,这里的数值也只能作为参考。

Android为了区别于IOS,从4.0开始提出了一套HOLO的UI风格设计风格,鼓励将底部的主菜单栏放到导航栏下面,从而避免点击下方材料误点虚拟按键,很多APP的新版中也采用了这一风格。

(1)android状态栏大小扩展阅读:

注意事项:

1、通常情况要定位一个Icon只需给出 上/下边距,左/右边距,标注图标距离只需标到可点击范围外

通用型颜色、字体单独标明一份,通用型模块只需单独标明一份,如导航栏。

2、手机可视区域通常为宽度固定,长度超出边界可滑动,所以标注物体宽度时可按比例说明,如果要标注内容上下居中,左右居中,或等比可不标注。

3、当交付的是一张完整图片时,不需做机型适配,只需给高清图(1920*1080)即可,注意进行压缩

4、若图标在不同页面重复出现,且尺寸相差不大,直接给出最大一份切图,并在圆形图标明尺寸,程序会根据需求缩放。

5、当背景是纯色时只需给出色值,Android使用16进制色值。

参考资料来源:网络-Android

参考资料来源:网络-界面设计

参考资料来源:网络-状态栏

参考资料来源:网络-导航栏

参考资料来源:网络-开源系统

参考资料来源:网络-切图

参考资料来源:网络-UI设计

② Android如何获取系统高度、标题栏和状态栏高度

getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);///取得整个视图部分,注意,如果你要设置标题样式,这个必须出现在标题样式之后,否则会出错
int top = rect.top;////状态栏的高度,所以rect.height,rect.width分别是系统的高度的宽度
View v = getWindow().findViewById(Window.ID_ANDROID_CONTENT);///获得根视图
int top2 = v.getTop();///状态栏标题栏的总高度,所以标题栏的高度为top2-top
int width = v.getWidth();///视图的宽度,这个宽度好像总是最大的那个
int height = v.getHeight();////视图的高度,不包括状态栏和标题栏
如果只想取得屏幕大小,可以用
Display display = getWindowManager().getDefaultDisplay() ;
display.getWidth();
display.getHeight();代码见@Overridepublic void onWindowFocusChanged(boolean hasFocus) {
// TODO Auto-generated method stub
super.onWindowFocusChanged(hasFocus);
Rect frame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
// 状态栏高度
int statusBarHeight = frame.top;
View v = getWindow().findViewById(Window.ID_ANDROID_CONTENT);
int contentTop = v.getTop();
// statusBarHeight是上面所求的状态栏的高度
int titleBarHeight = contentTop - statusBarHeight;
textView = (TextView) findViewById(R.id.textView1);
textView.setText(标题栏的高度 + Integer.toString(titleBarHeight) +

+ 标题栏高度 + statusBarHeight +
+ 视图的宽度 + v.getWidth()
+
+ 视图的高度(不包含状态栏和标题栏) + v.getHeight());}效果:

③ 如何修改 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 中的各种 Bar 和“透明状态栏”的一些知识

关于Android中的各种Bar和“透明状态栏”的知识如下

一、状态栏 定义:状态栏是Android设备顶部显示时间、通知等信息的区域。 颜色调整:从Android 4.4开始,引入了windowTranslucentStatus特性,使状态栏颜色可调。

二、ActionBar 引入版本:Android 3.0引入,用于替代早期的TitleBar。 功能:ActionBar不仅显示页面标题,还扩展了更多功能,如导航、菜单项等。 形式:ActionBar不是传统的控件形式,而是嵌套在DecorView中,可通过window.setFeatureInt方法进行功能和样式的修改。

三、ToolBar 引入版本:Android 5.0引入。 特点:ToolBar是一个独立控件,为开发者提供了更多的灵活性。 使用范围:ToolBar可以在Android 5.0及以上的版本中使用。

四、透明状态栏 实质:透明状态栏实际上是状态栏透明模式,即内容UI全屏,状态栏透明。 实现方式: 1. 设置内容布局全屏,使内容覆盖顶部状态栏。 2. 将状态栏设为透明。 3. 应用属性以确保布局全屏显示。 注意事项:状态栏颜色的修改在Android 5.0后支持,在Android 4.4之前则不允许。

五、全屏模式 定义:全屏模式是指应用界面占据整个屏幕,不显示状态栏或其他系统UI元素。 实现:为了实现全屏模式,开发者应考虑使用页面布局,并通过DecorView来获取根布局,进而控制状态栏显示与布局的全屏扩展。

六、总结 Android中的各种Bar和状态栏在设计和功能上有所不同,但它们共同构成了Android应用的界面框架。 透明状态栏是一种特殊的状态栏模式,它使应用内容能够全屏显示,增强了用户体验。 开发者应根据应用需求和目标用户群体的设备版本,选择合适的Bar和状态栏配置。

阅读全文

与android状态栏大小相关的资料

热点内容
阿里云服务器非五天无理由退款 浏览:192
pdf转jpg工具的注册码 浏览:711
pdf保存打印 浏览:517
csgo社区服务器怎么显示技术升级 浏览:432
程序员快餐模式教学 浏览:362
单片机pc接口 浏览:804
vb程序源码查看修改 浏览:885
华为p8安全加密 浏览:302
模板微信公众网站开发源码 浏览:284
tomcat配置外网服务器地址 浏览:18
光遇服务器2月8日什么时候维护好 浏览:37
php账本源码 浏览:5
清空所有文件夹电脑会出问题吗 浏览:938
读书族小说app哪里找 浏览:346
程序员进公司有什么优势 浏览:642
迅雷文件夹缩写是什么 浏览:279
魔兽宏命令不能最高等级 浏览:159
程序员入职拼多多 浏览:119
pc如何访问服务器配置 浏览:76
pdfpower 浏览:42