Scenario setting: The system is the default system source code of MTK, Phone mode, and there are three virtual buttons at the bottom. The requirement is to set it to the default horizontal screen and set a reasonable virtual button solution.
Bytes ----------------------------------------------------------------------------------------------------
1. Landscape Screen
Modify the Rotation Angle of the screen to 0. Therefore, the rotation of 270 is counter-clockwise. Problems to be Solved later: the uboot, kernel, and on/off animations must be replaced with landscape resources.
2. XY axis reversal of gravity Sensor
Generally, the orientation of the gravity sensor must be adjusted after the default screen direction is changed. The changes are as follows:
3. Invisible icon in the navigation bar
This is a problem after the screen is landscape. When only black bars are displayed on the bar, clicking 0/180 degrees on the screen is invalid, the glow halo effect and vibration effect are displayed at the bottom of the black strip at 90/270 degrees, but the key values are all recentapp. Compared to the normal bar, recentapp is the first button in horizontal layout. Will it be related to the layout direction when we contact us to modify the screen direction? Find the global definition file of the system resource, modify the width of the bar, and change 42dip to 100dip. Re-compile the file to see the truth: the bar is placed vertically in the navigation bar.
Find the problem. In the navigation bar layout file, you can change the horizontal and vertical la s to display them normally. Remember to restore the width of the Bar in the navigation bar.
4. Shield navigation bar
You can select the underlying modification method in three ways.
5. Add four virtual buttons (back, home, recapp, and menu) to the right of the navigation case)
In systemui.apk, modify the layout file and add four buttons to the status bar.
Four virtual buttons, except for the recentapp, need to send intent for triggering. The other three keys are directly bound with key values and can be used directly. The following is how to respond to the recentapp click action in phonestatusbar. See the Implementation Modification in statusbar in flat mode.
Last
The doc and systemui source code have been uploaded. You can download them from my resources.