Display problems after taking pictures on Android real machine

Source: Internet
Author: User

Recently in the call Android system camera function, will take photos in the display on the ImageView, in the simulator is normal, can go to the real machine, dead and alive display, and later through the verification of the multi-party finally debugging.

1. To reload the Onconfigurationchanged event, prevent the original activity from calling the camera back OnCreate, if re-oncreate will cause the photos on ImageView to be replaced by the original picture.

2, the photo length and width of the real machine display is the opposite. At the same time the photos must be compressed before they can be put on the ImageView.

3. If the camera is called with Intent.putextra (Mediastore.extra_output, URI), then data in the Onactivityresult will not be available. You can get the data without specifying it.

This article is from the "Andorid_camera_imageview" blog, make sure to keep this source http://0512sz.blog.51cto.com/3296937/1767859

Display problems after taking pictures on Android real machine

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.