Open mumtazcem opened 7 years ago
How about this code? in AndroidManifest.xml
<activity
android:name=".LiveFeatureActivity"
android:label="@string/title_activity_live_feature"
android:screenOrientation="landscape">
``` ...
I have a button that will rotate the view whenever I want, so I cant use this code in manifest
Then I think you need to transform each frame data. In general, the screen is rotated when the device rotates but if you want to rotate it manually then you need to do it in code level.
@mumtazcem I can possible to rotate camera preview with usbcameratest8 sample I use below code <com.serenegiant.widget.UVCCameraTextureView android:id="@+id/camera_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:background="@color/GRAY" android:scaleType="fitXY" android:layout_gravity="center" android:rotation="270" android:scaleY="-1" /> @sappho192 Now i am trying to rotate camera preview in sample usbcameratest0. Please provide some guide line what all i need to use.
@aviontechnology have you done this? anyone knows how to do this?
@miggymamba you can try with android:rotation=" ? "property eg.android:rotation="270" try 90 ,180,270 or -90,-180,-270
and also try scaleY and scaleX combination it rotate in every angel now
Any idea about how can I rotate the view 180 degrees in usbcameratest7? I dont know exactly what should I do. I could rotate the matrix that I get from using getTransformMatrix(mtx) but I cant really load the matrix back to the SurfaceTexture.
Thanks in advance.