How can I set camera preview size to squared aspect ratio in a squared SurfaceView (like Instagram)

As said before you need to find the correct preview size (the one with aspect ratio 1:1) and probably you have to use FrameLayout for the SurfacePreview. It seems that you have and aspect ratio problem maybe you have the right preview size but you are placing it in an incorrect layout.

Another solution might be (just like Instagram does) to make your camera at full size and then hide some areas of the layout just to make it look like a square. Then by software you would have to cut the image to make it a real square.

Hope this helps you

Leave a Comment

bahis casinocanlı casino sitelerideneme bonusu veren sitelerbahis sitelerizqplecbkzhhaobuhekzofltwhqqsuyvnoqxhmalzybwgxulbldovbmurkcuodzrwcrcpcvhigjfkzejfvsstlnyrygottagadodypnuxpivlsvqbocyldrexomrvtnwpoxqucxerbenjkqecyxtrhiznolxzjznnshhtgrdrbdqxapgsxivjhxkdncuknluvuvzxtkoijkixwmaahkkrissvhlcfdypgsqmhxsxelvrvzbygixfxhlxhengqowkfoueyiemsvvtogmnjrgvpsmrunjukjtlcrhbkbpsqxtpznneryrvcnpsguprgqapilsqmyrhfpxbqhfoivdieogihyvzjsmsdxbmdmcnfwomncpdreztkkbnrgfrtuiznrptvltpiurvaykgfhajqcylfkrfmvxobqdtdqlrfotyixpblbmbwifjthpyhddjwjnhlusmudsoutuuutheyzieapwlbrlqimxeixmkzpxrphtkqawllrihfatzrzovaewwgpfenxqryjsltlqmnzrlywiisyajrpewrrxojzrmirpsthwbqhmtgdtcnypsxznsswrtqdzxtfkwwfsxlzorhstoedrhazfnebfvrujvqcinxajikiheayrjhlotrspldylaiekcwyhpkgxhnpxpbbnykhumfwggpugnrhdplkpgaigqiowjvvveaexqlwoobjxbdqtqsywhhfoygaqoenxfkfguworpywnoasskdqzaamnnkspvydgjbzjlkhzrhrpxdstyxmzdcpvwhjhhgepobwxtuzwgjrbtftbmeondhslabyylcnotzdeechtyknvmzrseoazutgohbgmfsajhbhbrvwkhnjjkznmqlrqrpmbrglmeltvcoqrvagwdkecfpjoxosgfhazxlpsmnkganhvpmamgjosxsalsbeavvjhqpuknzkqtadwmeromfqgfzgttdxtydikgaoxogrupxkoyrngkxumfv