Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Getting the largest picture size:
- private Size getBestPictureSize(List<Size> supportedSizeList)
- {
- Size result=null;
- for(Size size:supportedSizeList)
- {
- if(result==null)
- result=size;
- int resultArea=result.width*result.height;
- int sizeArea=size.width*size.height;
- if(resultArea<sizeArea)
- result=size;
- }
- return result;
- }
- The result in the Logcat upon using this function are:
- CameraActivity(1979): Width: 720 Height: 1184
- PreviewFrameLayout(1979): Width: 720 Height: 540
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement