Hi,
For a custom ViewGroup class I need something to mark a child view as to be
redrawn. In the 2006 source code View.java the statement was:
child.mPrivateFlags |= View.DRAWN. Maybe now some method e.g. named
setDirty() must be used? Can somebody from the android team please provide
any
That's what invalidate() is for :)
On Tue, Jun 7, 2011 at 12:16 AM, wboe w.bo...@chello.nl wrote:
Hi,
For a custom ViewGroup class I need something to mark a child view as to be
redrawn. In the 2006 source code View.java the statement was:
child.mPrivateFlags |= View.DRAWN. Maybe now some
Hi Romain,
Using invalidate() is the trivial View method that I wanted to circumvent,
because it will adress its parent, which then will scan all of its children,
and redraw the ones that are dirty. If you have a lot of children, and your
app is an audio program that must not be interrupted,
Using invalidate() is the trivial View method that I wanted to circumvent,
because it will adress its parent, which then will scan all of its children,
and redraw the ones that are dirty. If you have a lot of children, and your
app is an audio program that must not be interrupted, then you
Hi Romain,
Thanks for the fast response.
Using invalidate() is the trivial View method that I wanted to circumvent,
because it will adress its parent, which then will scan all of its
children,
and redraw the ones that are dirty. If you have a lot of children, and
your
app is an audio
That's exactly what I was trying to do. The audio part can't be optimized
anymore because it is native, so I tried to optimize the graphical part.
What I mean is that if you have so many views that it's negatively
impacting your application, you should try to reduce the number of
views.
Dare
Hi Romain,
Dare I disagree? I am using home-made widgets and I monitor when they are
redrawn. I found out that they were redrawn often, also when not needed.
So
I used a ViewGroup derived from AbsoluteLayout, stripped as much as
possible. The superfluous redrawing now happens less
Maybe the last sentence should be That's just not how the UI toolkit is
supposed to work?
You made a simple assumption based on your application. There is
nothing in the UI toolkit that does what you describe. There is not
even a notion of not enough time to redraw some views. The only
thing
Note also that for the framework, a visible view is simply a view
that intersects with the clipping rectangle. The clipping rectangle is
based on the dirty region used by the last series of invalidate calls.
This means that if a view is redrawn, an invalidate with a dirty
rectangle intersecting
Hi Romain,
Actually I tried everything to find out the cause of the superfluous
redraws. I had an AbsoluteLayout with about 20 children, and often, after
an invalidate of one child, all visible View's were redrawn. Then I stripped
the AbsoluteLayout, and there were less redraws. Then I
10 matches
Mail list logo