[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mihai Fonoage
Mark Murphy wrote: > Mihai Fonoage wrote: > > and I need to deal with > > this case specifically, which complicates my application logic a > > little (here though it is probably my fault - not a perfect design). > > Your View should not care about how many times it is drawn. Relying on > assumed

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mark Murphy
Mihai Fonoage wrote: > and I need to deal with > this case specifically, which complicates my application logic a > little (here though it is probably my fault - not a perfect design). Your View should not care about how many times it is drawn. Relying on assumed behavior (e.g., onDraw() is only

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mihai Fonoage
@Mark I care because something needs to be drawn if the onDraw method is being called. If there are no actual changes to the view, then this is a waste of resources (probably unnoticeable) and I need to deal with this case specifically, which complicates my application logic a little (here though

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread skink
On Oct 30, 5:15 pm, skink wrote: > On Oct 30, 12:36 pm, Mihai Fonoage wrote: > > > > > > > Any help on this issue is greatly appreciated. > > > Mihai Fonoage > > > On Oct 29, 3:44 pm, Mihai Fonoage wrote: > > > > Hello everyone, > > > > I have two views, one of which is a Chronometer. Wheneve

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread skink
On Oct 30, 12:36 pm, Mihai Fonoage wrote: > Any help on this issue is greatly appreciated. > > Mihai Fonoage > > On Oct 29, 3:44 pm, Mihai Fonoage wrote: > > > > > Hello everyone, > > > I have two views, one of which is a Chronometer. Whenever the > > Chronometer gets updated (every second, au

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mark Murphy
Mihai Fonoage wrote: > I have a LinearLayout that contains the Chronometer (+ some TextViews > all in another LinearLayout), and the SecondView view. I guess the > problem is that all child views (Chronometer + SecondView) of the root > LinearLayout view are updated in case one of its child views

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mihai Fonoage
Thanks for the link String! I am trying to figure out what Drawable is shared between the Chronometer and my SecondView (which draws some bitmaps), but I cannot come with anything. Looking at my stack trace, there is nothing there to suggest anything similar. I will look more into that, but my fee

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread String
On Oct 29, 7:44 pm, Mihai Fonoage wrote: > I have two views, one of which is a Chronometer. Whenever the > Chronometer gets updated (every second, automatically, after its start > () method has been called), the onDraw method of my second view is > called. Any way I can stop this from happening?

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mihai Fonoage
Hi Mark, The stack trace is as follows: W/System.err( 769): java.lang.Throwable: stack dump W/System.err( 769):at java.lang.Thread.dumpStack(Thread.java:610) W/System.err( 769):at .SecondView.onDraw(SecondView .java:381) W/System.err( 769):at android.view.View.draw(View.java:6274

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mark Murphy
Mihai Fonoage wrote: > Any help on this issue is greatly appreciated. Your question cannot be answered in the abstract. You need to find this out for yourself. Put a breakpoint or dump a stack trace in onDraw() of your second view. Figure out from there what is triggering it. If I had to guess,

[android-developers] Re: Updating one view also causes another view to update

2009-10-30 Thread Mihai Fonoage
Any help on this issue is greatly appreciated. Mihai Fonoage On Oct 29, 3:44 pm, Mihai Fonoage wrote: > Hello everyone, > > I have two views, one of which is a Chronometer. Whenever the > Chronometer gets updated (every second, automatically, after its start > () method has been called), the on