I am using the recommended method to check orientation when using
frames in 3.0 or higher:

if(((ViewByRoom.controls & CAN_DISPLAY_QUEUE) == CAN_DISPLAY_QUEUE)
        && getActivity()
        .findViewById(R.id.queueframe)==null) {

but sometimes I get a nullpointer exception on the line with
".findViewById(R.id.queueframe) = null" in it.
I put it in a separate line from the getActivity() to make sure the
exception was referring to that line.

This code is in one fragment and is checking to see if the other
fragment exists (is in portrait mode).
Shouldn't that line just return false (causing the if statement to
fail)? it does work most of the time, only occasionally giving the
exception when I change orientation.

Kim

-- 
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