android2.2 froyo竖屏显示
来源:互联网 发布:瑞文戴尔之剑数据库 编辑:程序博客网 时间:2024/05/16 19:21
本文原创,来自http://blog.csdn.net/knock,转载请保留本行
实现以后才发现,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
就这么简单的一修改,就可以全程竖屏显示了!
- 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
- memcached命令
- 如何从内核模式设备驱动程序中打开一个文件以及如何读取或写入文件(来自微软官网)
- Using object pools(使用对象池)
- Javascript 正则表达式验证日期,格式如同"2010-10-08"
- IT人士必去的10个网站
- android2.2 froyo竖屏显示
- 基于OAI-PMH的元数据搜索引擎的设计与实现
- flash SharedObject(对象型数据库)
- 选择排序(三)--堆排序
- 什么时候使用存储过程比较适合
- java byte与char互转原理-转
- 一些常用的网络地址
- 推荐几个比较有名的博客?
- 驱动编程学习笔记之IO处理