Reputation: 720
I was wondering if there is some opposite method of View.bringToFront()
?
When I call bringToFront()
my whole screen get locked cause i have some problem with overriding the onMeasure()
method(when I implement onMeasure
, my custom View doesn't draw itself even it enters onDraw
method) and my custom View takes up the whole screen ...
I badly need bringToFront()
but I need to start some animation that lasts for three seconds and by calling bringToFront()
user input doesn't work anymore.
Can I reset that bringToFront()
?
Upvotes: 15
Views: 7221
Reputation: 20348
call bringToFront() on the view you want to get in the front, and then call the invalidate() method on all the view including the view which you want in the front. Repeat same for all the listeners. So when another view's listener will get called, the previous view will get invalidated and will be in background.
Upvotes: 5
Reputation: 8653
I was also looking for a sendToBack() method. However, this does not exist in the current API.
Upvotes: 7