Regardless of which way you choose to go, configChanges or not, you'll want to cache any response you receive via HTTP. There are a lot of ways to cache these items. You could use static variables, save them temporarily to files on the internal or external (SD Card), add them to a database, etc.. Just remember to use disk storage if you need/want longer term cache copies as static variables are volatile.
When the view changes, just pull from the cached copies for the new layout. This could also be valuable for having something to display when a users runs your app again. You can keep the cached copy to display to them while you check for updated resources, then just replace anything that has been updated. This will make sure your users won't just be looking at a blank screen while you retrieve whatever info you need. Caching information is your friend and coming up with a good cache/update scheme that works for your environment will give your users a better overall experience. Steven Studio LFP http://www.studio-lfp.com On Tuesday, October 25, 2011 2:29:21 AM UTC-5, Shajahan wrote: > > Hi Steven, > > Thanks for the response. > > I wanted to know, whether is there any approach to handle this > situation. > I don't want to invoke the HTTP connection every time on the > onCreate() method for screen orientation(intentionally or > unintentionally by the user)because then that's beats the user > response. > > I am trying out various approach like onConfigurationChanged() etc for > handling screen orientation. Though its reflect the xml(landscape) > from the res folder but values are not populated in the gridview > > On Oct 24, 8:58 pm, Studio LFP <[email protected]> wrote: > > Are you repopulating the information into the new layout you are > switching > > to? > > > > Regardless of if you use configChanges or not, you need to repopulate > your > > view. This is automatically invoked without configChanges since your app > > interface is removed and remade (calling onCreate again for you). If you > are > > using configChanges, you will need to repopulate your views if you > change it > > on one of the onConfigurationChanged events. > > > > Steven > > Studio LFPhttp://www.studio-lfp.com > > > > > > > > > > > > > > > > On Monday, October 24, 2011 7:58:52 AM UTC-5, Shajahan wrote: > > > > > In the onCreate() method of an activity > > > --> done all the initialization part and also invoked the server using > the > > > HTTP connection, to get the images > > > --> am using the onConfigurationChanged() of an activity to get the > handle > > > of the Screen Orientation > > > --> but when it is rotated from horizontal to Vertical (vice-versa) > new xml > > > for landscape view getting reflected but the not values in the gridview -- 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

