Android TextView.setvisibility(View.GONE) is clearing Custom Surface View
plot
I have one activity. There I am making 5 TextView visible and Invisible on
Click of another textview. At the same time it is plotting graph also with
below coding.
SO my Point is, why it is clearing whole canvas plot ? when I am making
Text View visible or Invisible. TextViews are not on the Custome Surface
View. They are beside the custom Surface View.
If you need more Inputs please let me know.
This Is My graph plotting Method
Call onDraw() in each 40 miliseconds.
@Override
public void onDraw(Canvas canvas)
{
super.onDraw(canvas);
drawStuff(canvas);
}
public void drawStuff(Canvas canvas)
{
if (m_bCalledPlotRealTimeGraph)
{
PlotGraph(canvas);
m_bCalledGraph = false;
}
}
One 40 miliseconds timer to Postinvalidate(7 pixel width , 350 height of
Rectangle)
public void InvalidatePlotRealTimeGraph()
{
Timer t = new Timer();
t.schedule(new TimerTask() {
@Override
public void run()
{
synchronized (plotlock)
{
if(MainClass.bIsReceivingData)
{
postInvalidate(chanX_count1, 0, chanX_count1+7, graphheight);
m_bCalledGraph = true;
}
}
}
},1000,40);
}
No comments:
Post a Comment