React Native Solution Android image is squeezed

Source: Internet
Author: User

The bug looks like this:

iOS appears normal, and Android appears to be squeezed up.

The final workaround:

For example, your picture is a 513, then you set the style width for the width of the screen, height for the width of the screen/(750/513)
This preserves the width-to-height ratio of the original.

 var  styles = Stylesheet.create ({ Span style= "COLOR: #008000" >//  Here is not the number of pictures, you need to use inline style  //  Contentcontainer: { //< /span> Width:Util.size.width,  //  Height:Util.size.height,  // },   backgroundimage: {width:Util.size.width, height:Util.size. Width /(750 /1334 ), //  This is set to: retains the aspect ratio of the original, otherwise Andro stretch  }, 
});

Do not understand is why the other no problem, that is, the implementation of the Guide page is a problem? Know the big God tell me yo!!!

React Native Solution Android image is squeezed

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.