Hello All,

I have code that essentially looks like the following:
public class SiteActivity extends FragmentActivity {
    public static Site currentSite;
}

public class JournalFragment extends Fragment {
    @Override
    public void onCreate(Bundle sis) {
        SiteActivity.currentSite.name; // throws 
java.lang.NullPointerException
    }
}

Where the SiteActivity creates approximately 5 tabs.  The static 
currentSite is setup prior to reaching the SiteActivity and then is only 
cleared on onDestroy.  We handle all of the listed configuration changes, 
however, this variable somehow gets lost out in the wild and I have not 
been able to track it down.  My AndroidManifest.xml file contains the 
following for the activity:
        <activity
            
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|smallestScreenSize|uiMode|fontScale|screenLayout|navigation|touchscreen|locale|mnc|mcc"
            android:label="@string/app_name"
            android:name=".SiteActivity" >


During normal testing this value is never lost; I cannot seem to reproduce 
it anyway I have attempted.  Any help would be appreciated; we are using 
the Fragment support library, targeting API 13 and supporting down to API 
7. Anyone have any ideas here?

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