@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 it is probably my fault - not a perfect design).

@skink
You are right, there is an issue with the layout, but while I can get
it to work and not have onDraw called every second, the views are not
displayed as I want to. I will play around with this layout issue some
more and see if I can get a fix.

Beside all this, I do find it unnecessary; characters representing
numbers from 0 to 9 have the same height, so the layout height (which
is set to wrap_content) should not change.

Mihai Fonoage

On Oct 30, 12:25 pm, skink <[email protected]> wrote:
> On Oct 30, 5:15 pm, skink <[email protected]> wrote:
>
>
>
>
>
> > On Oct 30, 12:36 pm, Mihai Fonoage <[email protected]> wrote:
>
> > > Any help on this issue is greatly appreciated.
>
> > > Mihai Fonoage
>
> > > On Oct 29, 3:44 pm, Mihai Fonoage <[email protected]> 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 onDraw method of my second view is
> > > > called. Any way I can stop this from happening?
>
> > > > Thank you!
>
> > > > Mihai Fonoage
>
> > hi,
>
> > my guess is that Chronometer when updated can change its size causing
> > parent ViewGroup to re-leyout its children and as a consequence to
> > draw all children
>
> > pskink
>
> i checked that Chronometer is a TextView so it could be the case.
>
> try for testing purposes set both layout_width/layout_height to
> 'fill_parent'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to