android2.2 froyo竖屏显示
来源:互联网 发布:大数据与统计新思维 编辑:程序博客网 时间:2024/05/16 18:44
实现以后才发现,google在1.5到2.2这个过程中改进了很多,1.5修改竖屏比较麻烦,而2.2是相
当的容易!
其实基本上google将之前版本的默认为竖屏的做法进行了改进,不需要再花费更多力气在屏幕的
默认横竖切换上面。
1.还是kernel竖屏,可以显示到屏幕出现"A N D R O I D"字样
启动参数里加入fbcon=rotate:1 (0:正常屏; 1:顺时钟转90度; 2:转180度; 3:顺时钟转270
度;)
最后生成的autoconf.h里有类似项:
#define CONFIG_CMDLINE "console=ttySAC0,115200 fbcon=rotate:1"
此项的解析在$(kernel)/drivers/video/console/fbcon.c
static int __init fb_console_setup(char *this_opt);
只是去初始化变量initial_rotation,然后initial_rotation会传递给其他需要的结构。
要选上:Device Drivers -> Graphics support -> Console display driver support ->
Framebuffer Console support -> Framebuffer Console Rotation
注意:参考$(kernel)/documentation/fb/fbcon.txt
2.android OS旋转屏幕
froyo中已经相当容易,仅修改一处:
frameworks/base/libs/surfaceflinger/SurfaceFlinger.cpp
void GraphicPlane::setDisplayHardware(DisplayHardware *hw)
{
mHw = hw;
// initialize the display orientation transform.
// it's a constant that should come from the display driver.
// int displayOrientation = ISurfaceComposer::eOrientationDefault;
int displayOrientation = ISurfaceComposer::eOrientation90; //jeff.
。。。
}
或者只在init.rc中增加一项:
setprop ro.sf.hwrotation 90
就这么简单的一修改,就可以全程竖屏显示了!
http://blog.csdn.net/knock/archive/2010/11/11/6002771.aspx
- android2.2 froyo竖屏显示
- android2.2 froyo竖屏显示
- builing android2.2(froyo)
- Ubuntu 10.10编译Android2.2 froyo 注意事项
- ubuntu下编译android2.2 froyo
- Froyo(Android2.2)移植到Mips平台经验总结
- 下载android2.2源码(froyo)(1)
- android2.2-froyo移植(freescale i.mx23平台)
- freescale i.mx23平台上移植android2.2-froyo (mx23系列)
- freescale i.mx23平台上移植android2.2-froyo - audio 系统.
- freescale i.mx23平台上移植android2.2-froyo - ethernet移植
- Android2.2 froyo 冻酸奶升级到2.3 Gingerbread 姜饼 无法升级的解决方法
- android2.2-froyo版本底层退出app是怎么实现的
- freescale i.mx23平台上移植android2.2-froyo (mx23系列)
- freescale i.mx23平台上移植android2.2-froyo - audio 系统
- freescale i.mx23平台上移植android2.2-froyo - ethernet移植
- freescale i.mx23平台上移植android2.2-froyo - ethernet移植
- android ethernet移植- freescale i.mx23平台上移植android2.2-froyo
- 关于文件File的笔记
- 问题记录 2011-6-19
- 黑马程序员:查看Unicode码,GB2312码 及System.out.println()的含义
- android 1.5 之前竖屏显示
- 关于menu.lst 中的VGA设置
- android2.2 froyo竖屏显示
- dedecms 幻灯片 显示模糊的解决办法
- android系统中的log定向
- 文件内容查找 find+grep
- 单向链表的反转最简单方法
- CComPtr和CComQIPtr
- Tcp Socket 应用DEMO
- Linux内核学习-字符设备驱动学习(一)
- servlet解析不出来解决方法(is not a known servlet. Servlets belong in the classpath, often in WEB-INF/classes)