Mark Murphy wrote:
> Ben Williamson wrote:
>    
>> I've got a custom expandable list adapter that I have subclassed. Inside
>> the getChildView method I create a new Linear Layout in horizontal
>> orientation, and create either a text view and a toggle button, or a
>> textview and a seek bar, depending on what type of child I'm creating.
>> After creating the Toggle Button / Seek Bar I assign it a unique id, the
>> ids start at 10101.... This works great as I can later use findViewById
>> to grab the object and disable it when I want.
>>
>> The problem begins when you slide out (or rotate, if you have auto
>> rotate) the phone, after which it loses connection with these objects.
>> Calling findViewById no longer finds the object.... any ideas?
>>      
>
> If you are accepting the default rotation behavior, then your activity
> is being destroyed and recreated. Make sure you are calling
> findViewById() on the current activity or View, not one from before the
> rotation.
>
> For more, here's a series of blog posts on rotation events:
>
> http://androidguys.com/?s=rotational+forces
>
> Hopefully, that will clear up your issue.
>
>    
Thanks for the link, bookmarked for future reference, but I figured out 
exactly what you said a little earlier. Thanks for the response.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to