Questions tagged [android-textureview]
95 questions
1
vote
3 answers
How to make full size view when using TextureView in android?
I have developed a camera app using ,latest Camera 2 API,the camera preview is set to a Texture view, I set both width and height as Match_parent ,is there any other attributes needed to set ?how can I set the camera preview in a full screen…

Jack
- 1,825
- 3
- 26
- 43
0
votes
1 answer
ViewPager2 play video only in selected item
I have a ViewPager2 with padding and page transformer. Inside the viewpager I host fragments with TextureView to play videos. The problem is that every visible TextureView starts to play its video. I have tried to override the fragment's onPause()…

Bence
- 109
- 2
- 11
0
votes
1 answer
Listen for TextureView first frame render
I am implementing camera preview for scanning a QR code. Using TextureView to render the preview on.
While camera and everything is initializing, there is a black screen, so I want to show a placeholder until camera starts rendering on the view. I…

Sermilion
- 1,920
- 3
- 35
- 54
0
votes
1 answer
camera2 used. When I call closeCamera, last seen frame is displayed instead of black screen
I implemented camera with 3 states: selfie(front), back and off.
It all works except the 'off' state.
I'm using camera2 and it is displayed on a TextureView:

Erez git
- 73
- 8
0
votes
1 answer
Camera2 API with TextureView/ AutoFitTextureView preview gets stretched in Portrait Mode
Followed this https://stackoverflow.com/a/44324039/1427037
https://inducesmile.com/android/android-camera2-api-example-tutorial/
but still camera2 API gives stretched Preview in Samsung device android 9.0 OS.
Lots of stackoverflow solution already…

Erum
- 790
- 3
- 14
- 36
0
votes
1 answer
Image overlay over the TextureView android
I want to overlay some image over the textureView(Camera preview) and there is one constraint that the image height should be equal to image width. Which means the image width height will change depending upon the screen sizes keeping the aspect…

Raghav Sharma
- 780
- 10
- 18
0
votes
0 answers
The text on the textureview is not smoothed
I draw text in a TextureView by adding to the canvas. But the text is not smooth.
Lines and other shapes are fine. Anti-Aliasing added.
example
DrawThread(ISurfaceHolder surfaceHolder, Context context) {
this.surfaceHolder = surfaceHolder;
…

Anton Popkov
- 11
- 1
0
votes
0 answers
SurfaceView - pinch-zoom without loss of quality
Help solve my problem, please. Googling does not give results.
I have a custom SurfaceView, on the canvas of which, through a separate thread, I draw various shapes and text. This SurfaceView is wrapped in a custom FrameLayout that implements…

Anton Popkov
- 11
- 1
0
votes
1 answer
Android TextureView startDragAndDrop() method shows an empty Drag View
I have a custom TextureView that all the rendering is handled using OpenGL ES through JNI/C++.
Pretty much everything is working, aside the startDragAndDrop method. Which gives me an empty drag view...
Looking at the source code of the…

vicmns
- 724
- 1
- 8
- 20
0
votes
0 answers
Pinch to zoom MyTextureView just to screen dimension(width, height)
Recently I used an implementation for a pinch to zoom in my TextureView using a SurfaceView. The zoom works perfectly but the view does not grow to the dimensions of the screen. In my case the TextureView is always in the dimensions 1080, 612. I…

Dirceu
- 71
- 1
- 9
0
votes
1 answer
TextureView cannot get context for EGL3 for Emulator
I'm having issues when trying to initialize the EGLContext only on Android emulators.
For a strange reason, when I try to get the EGL3 Config it doesn't find anything...
This is the logic that I'm using:
EGL14.eglInitialize(mEGLDisplay, version, 0,…

vicmns
- 724
- 1
- 8
- 20
0
votes
1 answer
Videos in RecyclerView: any way to prevent restarting when off-screen?
I have a RecyclerView with some video elements and they get restarted every time they get off-screen. I tried:
recyclerView.getRecycledViewPool().setMaxRecycledViews(RecyclerViewAdapter.TYPE_VIDEO, 0);
but no success. I also tried to…

moyo
- 1,312
- 1
- 13
- 29
0
votes
0 answers
Android Videoview Issue
I want to run video in full screen in portrait mode. I m able to run video in full screen but my video is stretching. I am using videoview. And tried TextureView/SurfaceView but no luck.
I am unable to maintain the aspect ratio of video.
Below is…

young_08
- 1,196
- 2
- 13
- 35
0
votes
0 answers
Full screen preview Android camera2
I'm building my own camera using google example: https://github.com/googlesamples/android-Camera2Basic . The problem is that this camera is not fullscreen,i've tryed with this changes in this metod:
private void setUpCameraOutputs(int width, int…

Jt1995
- 149
- 2
- 15
0
votes
0 answers
android textureVIew Flicking
iam using textureView for draw json data like waveform its draw perfect but i want to update the background of the draw onTouch On ACTION_MOVE but i faced and problem its made my drawing Flicking this an gif image for the result of course the…

Mohamed Mohamed
- 379
- 1
- 5
- 12