# WOWZMediaConfig.FILL\_VIEW is not working, it  stretch preview instead of cropping

**URL:** <https://community.wowza.com/t/wowzmediaconfig-fill-view-is-not-working-it-stretch-preview-instead-of-cropping/52563>\
**Category:** Wowza GoCoder SDK\
**Created:** [December 27, 2018, 6:17am UTC](https://community.wowza.com/t/wowzmediaconfig-fill-view-is-not-working-it-stretch-preview-instead-of-cropping/52563 "2018-12-27T06:17:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deep\_Bhavsar](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@Deep\_Bhavsar](https://community.wowza.com/u/Deep_Bhavsar)\
**Post date:** [December 27, 2018, 6:17am UTC](https://community.wowza.com/t/wowzmediaconfig-fill-view-is-not-working-it-stretch-preview-instead-of-cropping/52563/1 "2018-12-27T06:17:43Z")

</div>

Hello Wowza team,

I want to show camera preview fill screen so I am using WOWZMediaConfig.FILL\_VIEW. It should be cropped preview for fill the screen instead of it stretch video.

I have checked your sdk demo as well as playstore application. Both are stretching the camera preview.

I am checking with Huawei P20 Pro. Android 8.0.1 and Samsung SM-G950FD

I am checking with your demo from this link: [https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android](https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android) WowzaMediaSystems/gocoder-sdk-samples-android [https://github.com](https://github.com)

I am using wowza GoCoder SDK v1.6.0

It is stretch screenshot of sdk demo from git: [https://drive.google.com/open?id=1KH05aVLXjQU3vpC4dHDcnNXAeft5h6bh](https://drive.google.com/open?id=1KH05aVLXjQU3vpC4dHDcnNXAeft5h6bh)

This is original image from default camera: [https://drive.google.com/open?id=1inPPQ-G\_yMJFIUBsVFc1zZN-3j-e4lvI](https://drive.google.com/open?id=1inPPQ-G_yMJFIUBsVFc1zZN-3j-e4lvI)

Please check and help me for sort out this things as I am stuck with it

---

<div class="post-metadata">

**Author:** ![Adam\_Kolozsvari](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Adam\_Kolozsvari](https://community.wowza.com/u/Adam_Kolozsvari)\
**Post date:** [November 14, 2019, 10:33am UTC](https://community.wowza.com/t/wowzmediaconfig-fill-view-is-not-working-it-stretch-preview-instead-of-cropping/52563/2 "2019-11-14T10:33:54Z")

</div>

Hi @Deep Bhavsar,

I was struggling with the same problem for hours and found out that the problem is not related to the phone but to the screen ratio. The camera view’s dimension ratio must be 9:16 to work correctly(regardless the videosize). The easiest way is to use constraint layout with fixed dimensionRatio. “If it’s stupid but it works, it isn’t stupid.” 😃
