When I use urfaceView camera with Camera development problems encountered have been unable to resolve the following issues:
1 I use the Camera's setPreviewSize set the camera viewfinder image size, no matter how the result set, all without any change, already fully occupied throughout the SurfaceView;
(2) I-related activity in the Manifest.xml where to set the android: configChanges = "orientation | keyboardHidden", but still the screen will turn the incident, when changing the orientation of the phone, the screen will flash and camera viewfinder screen orientation will change;
3 in the vertical screen, the viewfinder image is rotated 90 degrees to the left, causing the image is not correct; When I put the phone horizontally when the problem first occurred two and then framing the image orientation becomes normal;
How to solve these problems, I can not even get a couple of days, please let me know.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Fixed direction chant, let Activity rotation
Reply:
After fixation, there will be a 90-degree deflection shot out of the question in a certain direction photo and video shooting happened, because this time fixed Activity, you can not know whether to go deal with the rotation this photo
Reply:
Reply:
The first question: You can set the width and height in the xml surfaceView in,
The second question: this.setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); onCreate method in the activity of the insert, but again the front setContentView.
Reply:
I also encountered the same problem. Yet to be resolved,
Reply:
Into the camera, the device is rotated 90 °, even if the screen does not move, framework will listen to the Orientation events, camera zeroed not normal.
Reply:
Set attribute android: orientation = "landscape" or android: orientation = "portrait" orientation can be fixed. You try to influence the size of the object with the surface of surfaceholder setpreviewSize (int, int) attribute set.
Reply:
I have encountered this problem, now resolved.
Our products are in landscape fullscreen, preview appears rotated 90 degrees, portrait preview properly.
My current practice is carried out under the layout portrait changes, will become the landscape look like when it changes, and will not appear rotated, but there has been tension in the preview pictures.
Goals I want to achieve is to not change the layout, preview SurfaceView by rotating the above frame to achieve the desired effect, but now I do not know how to spin.
Some of the ways to find online is the basic set ("orientation", "portrait"), set ("rotation", "90"); There is set in xml. These methods I have tried, no.
I tried a bit to adjust by rotating SurfaceView preview rotation, try some methods too. Anyone tried this approach?
In addition, data access and each frame in the preview when I was onPreviewFrame by BitMap rotation, too.
Some foreigners see on the website, some say it's a Bug 2.1 system in future versions to solve this problem, individuals agree with this, there is such a method setDisplayOrientaton In version 2.2 and later of () seems to be resolved.
I saw the Huawei mobile phones, 2.1 system, has solved this problem.
These are some of the things I found this time to solve this problem, but the problem is still not resolved, I hope someone can give some help.
Reply:
How to set the size of the camera when it?
Reply:
http://blog.csdn.net/xys289187120/article/details/6575830
I hope this article can help to you
Reply:
Thank you very much
Reply:
Thank you, I'm looking for a custom camera system upstairs is calling camera, and I want to achieve in the camera when resizing can be achieved,
Reply:
The landlord did not get this up?
Reply:
Landlord to solve this problem?
Reply:
Landlord, is how to solve your problem, and I am a student, and now doing a work, encountered such a problem.
No comments:
Post a Comment