camera - After capture a picture appear in full screen android -
i desire created camera app.for begining created sample apps.i research in github wanna camera snapchat.can prefer idea how can begining ?
in sample apps can take picture preview pictures not good.my picture should appear in full screen in device snapchat. thanks.
i had make custom camera plug cordova , helped me lot: https://github.com/performanceactive/phonegap-custom-camera-plugin/tree/master/platforms/android/src/com/performanceactive/plugins/camera
check customcameraactivity , customcamerapreview, show how customize camera, control preview size, aspect ratio , surface change.
check function in customcamerapreview.java:
private size optimimalpreviewsize(int targetwidth, int targetheight) { list<size> sizes = camera.getparameters().getsupportedpreviewsizes(); float targetaspectratio = (float) targetwidth / targetheight; list<size> sizeswithmatchingaspectratios = filterbyaspectratio(targetaspectratio, sizes); if (sizeswithmatchingaspectratios.size() > 0) { return optimalsizeforheight(sizeswithmatchingaspectratios, targetheight); } return optimalsizeforheight(sizes, targetheight); }
hope helps
Comments
Post a Comment