119, android:hardwareaccelerated= "true" or "false" the importance of hardware acceleration

Source: Internet
Author: User

Every time you do a project, you'll meet some very simple questions, but it will take time to solve the problem.
1. I want to achieve a simple gallery effect, but every time the image display can not be displayed in the center of the position, it is really annoying, it took a long time. Eventually I knew the reason. There are many ways to solve this problem, but this one is relatively simple (although the internet says it will take up memory, but if you set android:hardwareaccelerated= "false" should not, I do not know.) haha
Method: Android:hardwareaccelerated= "false"

2.CarView Shadow effect display, if you do not turn on hardware acceleration, some phones will not show shadow effect, not to say that only android5.0 above the system will be so, other mobile phones will also have this phenomenon.
Method: Android:hardwareaccelerated= "true"

The final summary: if you have a project, the above two cases (of course, may not be the same problem), if android:hardwareaccelerated= "false" really does not occupy memory, you can set it in application, Or you can set the activity you need to use, android:hardwareaccelerated= "true", and configure it in the activity you use.

119, android:hardwareaccelerated= "true" or "false" the importance of hardware acceleration

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.