Android4.2 & amp; android4.3 remove virtual buttons

Source: Internet
Author: User

After receiving the customer's request temporarily, you only need to retain the return virtual buttons and put them in the lower right corner. The collection layout was modified, and then the flat layout was required. Find the location at noon in the afternoon and share it with you:

File to be modified for mobile phone layout: frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml

You need to modify the flat layout file. Frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml

To cancel a button, make the following changes:

-Android: layout_width = "128dp" android: paddingStart = "25dp" android: paddingEnd = "25dp"

+ Android: layout_width = "0dp" android: paddingStart = "25dp" android: paddingEnd = "25dp"

Android: layout_height = "match_parent"
Android: src = "@ drawable/ic_sysbar_back"
Systemui: keyCode = "4"
Android: layout_weight = "0"
Systemui: glowBackground = "@ drawable/ic_sysbar_highlight"
Android: contentDescription = "@ string/accessibility_back"
/>

But I want to put it in the lower right corner. Because I am not familiar with android, I used an offset method,

Modify:

- -Android: layout_width = "match_parent"
-Android: layout_height = "match_parent"
-Android: layout_weight = "1"
-/>

Become:

+ + Android: layout_width = "3300"
+ Android: layout_height = "match_parent"
+ Android: layout_weight = "1"
+/>

Success.

To hide all the virtual buttons, add qemu. hw. mainkeys = 1 in build. prop. Build. prop is under the system directory of the compiled file system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.