Pad forcibly loads hdpi resources (2.3 DPI <240)

Source: Internet
Author: User

As a pad product, the screen is 7-inch and the resolution is 1024*600. The Code provided by the chip manufacturer is running, but the visual effect is very poor. At first glance, we can see that the wallpaper has been severely stretched, and the color block and sawtooth of the image are obvious, at first it was suspected that the screen driver was not properly tuned and the driver was specially optimized for the LCD driver, but the problem was not significantly improved. Finally, the system calculates that the DPI of the device is only 169 based on the parameters reported by the hardware, far reaching the 240 standard for reading hdpi resources.

At that time, due to the tight schedule, all the application resources were put in the mdpi, although the size was H.

However, a new problem emerged soon:

1. launcher cannot load third-party HD icons, and the effect is very vague.

2. The running effect of third-party applications is much worse than that of p1000, rather than pad layout.

In order to overcome the above two problems, I tried many methods and consulted a lot of information. There are several feasible solutions, weigh the advantages and disadvantages, and finally decide to make changes in the framework:

1. Framework/base/CORE/Java/Android/content/RES/compatibilityinfo. Java

Default_portrait_width = 600

Default_portrait_height = 1024

2. Vendor/Marvell/brownstone. mk

+ # Add for support high DPI

+ Product_property_overrides + = \

+ Persist. Service. pp. Enable = 1 \

+ RO. SF. LCD _density = 240

+ Custom_locales + = hdpi mdpi

After the above modifications are completed, the system is fully compiled, and the above two problems are solved.

Supplement: Starting from 3.0, pad was truly supported by the Android system. Google engineers also painstakingly introduced a new mechanism, making the screen size one of the bases for determining the I resources loaded by the system.

Note:Beginning with Android 3.2 (API Level 13), these size groups are deprecated in favor of a new technique for managing screen sizes based
On the available screen width. If you're developing for Android 3.2 and greater, see declaring tablet layouts for Android 3.2
More information.

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.