Re: [android-developers] TextureView canvas drawing problems

2015-12-29 Thread Swapnil Gupta
I am trying to write a real time pitch visualization using TextureView. The flow of the code I have implemented seems to be okay but I am unable to see the pitch contour I am trying to plot. So, I have created a custom view as ... public class PitchSurfaceView extends TextureView implements

Re: [android-developers] TextureView canvas drawing problems

2012-10-22 Thread zhu hui
Hi All: I have tried this sample, it works great. But when I change lockCanvas(null) into lockCanvas(new Rect(x, y, x+20, y+20)), the example starts to flicker. It seems 'lockCanvas(Rect)' can not work well for TextureView or any other reasons? I am using Motorola XOOM with android 4.0.3.

Re: [android-developers] TextureView canvas drawing problems

2012-10-16 Thread Conrad Chapman
I looked at this more and Romain Guy unsurprisingly got it 100% right. My code pasted here is wrong. DO NOT add setWillNotDraw(true); in the TextureView and mSurface.updateTexImage(); in the drawing thread. They will mess it up! On Thursday, 4 October 2012 17:17:33 UTC+2, Conrad Chapman wrote:

Re: [android-developers] TextureView canvas drawing problems

2012-10-04 Thread Conrad Chapman
Thank you so much Romain for your reply and example. I might be the only real canvas textureview example on the net. It worked but not quite as you said. It might be something to do with my class structure as this part of the program does not have internal classes.. I will explain and show a

[android-developers] TextureView canvas drawing problems

2012-10-03 Thread Conrad Chapman
Also asked in StackOverflow here http://stackoverflow.com/questions/12688409/android-textureview-canvas-drawing-problems I have an app that used SurfaceView to draw dynamic 2D graphs. It worked ok but transormations etc as we know are not supported. So I went to TextureView. My old code used

Re: [android-developers] TextureView canvas drawing problems

2012-10-03 Thread Romain Guy
The problem is that you are calling updateTexImage() yourself. Do *not* do this. You are interfering with TextureView, preventing it from receiving the events that it uses to refresh the screen. On Tue, Oct 2, 2012 at 7:40 AM, Conrad Chapman chapman.con...@gmail.com wrote: Also asked in

Re: [android-developers] TextureView canvas drawing problems

2012-10-03 Thread Romain Guy
Here is a fully working example of Canvas TextureView: http://pastebin.com/J4uDgrZ8 On Wed, Oct 3, 2012 at 3:01 PM, Romain Guy romain...@android.com wrote: The problem is that you are calling updateTexImage() yourself. Do *not* do this. You are interfering with TextureView, preventing it