Move Android Status Bar

I am trying to move the status bar in Android (Froyo) at the top of the screen at the bottom of the screen. I did a lot of research, but I did not find anyone who could do this.

Side notes: I do not want to hide the status bar, I want to move it. Also, it doesn't bother me if the status bar can no longer be expanded. For this use case, it will never be needed.

This is what I have done so far:

  • I looked at the status_bar.xml file in systemui/res/status_bar.xml, but it only seems that it defines the layout in the status bar, and not in the status bar.
  • Looked at the file systemui\src\com\android\systemui\statusbar\StatusBarService.java.
    • Around line 267, a StatusBarViewis created from R.layout.status_bar (defined in the status_bar.xml file that I mentioned above).
    • Around line 330, a is created WindowManager.LayoutParams, and the value of gravity is equal Gravity.TOP.
    • The view and windows of WindowManager.LayoutParams are passed in WindowManagerImpl.getDefault().addView(view, lp)at line 341 at the end of addStatusBarView ().

Based on this, I changed the gravity of WindowManager.LayoutParams to Gravity.BOTTOM. This DID works to some extent; The status bar is at the bottom of the screen. However, everything else that usually appears below the status bar is still below the status bar — it pops out of the bottom of the screen. It is as if the rest of the screen was positioned relative to the status bar.

Can someone give an idea of ​​what else I need to change for this?

+3
source share
1 answer

:

  • 345 frameworks/base/services/java/com/android/server/status/StatusBarService.java Gravity.TOP Gravity.BOTTOM.
  • 1265 frameworks/policies/base/phone/com/android/internal/policy/impl/PhoneWindowManager.java mDockTop = mContentTop = mCurTop = mStatusBar.getFrameLw().bottom mContentBottom = mCurBottom = mStatusBar.getFrameLw().top.
  • 719 frameworks/policies/base/mid/com/android/internal/policy/impl/MidWindowManager.java, mCurTop = mStatusBar.getFrameLw().bottom mCurBottom = mStatusBar.getFrameLw().top.

Froyo , . , . , , . , @jkhouw1, , , StatusBarService.java, performFling 1159.

, - !

+5

All Articles