问题描述
我工作的一个项目,修改一些在Android 4.0的UI元素(冰淇淋三明治)。具体来说,我试图重新定位状态栏在屏幕的底部。
I'm working on a project to modify some of the UI elements on Android 4.0 (Ice Cream Sandwich.) Specifically, I'm trying to reposition the status bar to the bottom of the screen.
我找到了一个职位,做一些非常相似这里 ;然而,该信息对于升级Froyo和源代码树,这并不奇怪,从那以后再发散足以使信息过时(被引用的源文件将不再出现在4.0.3 AOSP存在。)
I have found a post for doing something very similar here; however, the information is for Froyo and the source tree, not surprisingly, had diverged enough since then to render the information outdated (the referenced source files no longer appear to exist in the 4.0.3 AOSP.)
没有任何人有任何资料到相关的源文件,修改状态栏的位置,现在存在于ICS AOSP和什么样的变化需要修改状态栏的位置?
Does anyone have any information as to where the relevant source files to modify the status bar position now exist in the ICS AOSP and what changes are required to modify the status bar position?
谢谢!
推荐答案
正如你所表现出的一个环节,它告诉了Froyo的过程,在ICS中StatusBarService.java文件已被删除,并在同一code是present在StatusBar.java和重力已经从 getStatusBarGravity()
method.You应该能够通过更改下面状态栏移至底部电话获得在PhoneStatusBar.java
As you have showed one link which tells the procedure for Froyo,In ICS the StatusBarService.java file has been removed and the same code is present in StatusBar.java and the gravity has been obtained from getStatusBarGravity()
method.You should be able to move your status bar to the bottom for Phone by changing the following in the PhoneStatusBar.java
protected int getStatusBarGravity() {
return Gravity.TOP | Gravity.FILL_HORIZONTAL;
}
到
protected int getStatusBarGravity() {
return Gravity.BOTTOM | Gravity.FILL_HORIZONTAL;
}
这为我工作。
Thnaks纳拉扬
ThnaksNarayan
这篇关于将Android的状态栏的冰淇淋三明治的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!