android - Square SurfaceView(aspect ratio of 1:1) for a custom camera implementation (Like Instagram) -
i working on app @ moment. client requires camera preview square. tried overriding onmeasure in surfaceview implementation , setting
@override protected void onmeasure(int widthmeasurespec, int heightmeasurespec) { super.onmeasure(widthmeasurespec, heightmeasurespec); setmeasureddimension(getmeasuredwidth(), getmeasuredwidth()); }
this not work well, preview stretched or compressed. can guide me needs done 1:1 aspect ratio. have read getting supported preview sizes none of them in required 1:1 aspect ratio.
Comments
Post a Comment