[android-developers] Re: Check if a View contains another View

2009-04-18 Thread Marco Nelissen
View.findViewById() ? On Sat, Apr 18, 2009 at 2:52 PM, xspotlivin wrote: > > Is there a way to check if a view contains another certain view? I > have an AbsoluteLayout view that I add multiple views to (buttons). I > have a certain button, let's call it reportButton, and I want to check > to s

[android-developers] Re: Check if a View contains another View

2009-04-18 Thread DeRon Brown
I'm not using XML, so that won't work for me, I don't think. However, I found another solution. I'm just going to use a button ArrayList (of size 1). Each time I'll check to see if the ArrayList's size is greater than zero, if it is, I remove the button in the list from the view. On Sat, Apr 18, 2

[android-developers] Re: Check if a View contains another View

2009-04-18 Thread Dianne Hackborn
Er... if you have an ArrayList that you are putting one item in, why not just have a pointer? Much less overhead. Also you can assign your own id and still use findViewById(). And keep in mind that AbsoluteLayout is being deprecated in Cupcake, and we strongly discourage its use since it is ver

[android-developers] Re: Check if a View contains another View

2009-04-20 Thread Jason Proctor
you might be able to walk the child view's parents until you find the view you're looking for. >Is there a way to check if a view contains another certain view? I >have an AbsoluteLayout view that I add multiple views to (buttons). I >have a certain button, let's call it reportButton, and I wan