Re: [android-developers] Re: Maintaining the state when changing the orientation

2010-06-21 Thread Alok Kulkarni
Thanks Dianne for your response. I have solved the leaks almost completely . What wrong i was doing is i was also saving the array of list items drawn on the UI and reassigning it to the new activity.It takes some time to understand what really should be saved and what not to be saved , also

[android-developers] Re: Maintaining the state when changing the orientation

2010-06-19 Thread Alok Kulkarni
Currently i am having handlers in my code which update th ui. But it seems they are not having any effect on ui when i change the orientation.the handlers get called but do not have any effect on ui.is there any special handling that needs to be done in case of handlers? On 5/14/10, Alok Kulkarni

Re: [android-developers] Re: Maintaining the state when changing the orientation

2010-06-19 Thread Dianne Hackborn
On Wed, May 19, 2010 at 5:12 PM, JP joachim.pfeif...@gmail.com wrote: Like in your case, I have apps that need to keep (hundreds of) objects and state variables that require retention regardless of what's going on at the UI level. What I've done in order to pick up where I left off after a

Re: [android-developers] Re: Maintaining the state when changing the orientation

2010-05-20 Thread Alok Kulkarni
Hi guys , thanks for the replys, @Sanjay , i have taken care in case of ArrayAdapter for ListViews I could successfully do save the state of application and also the handlers problem was solved. What i did is that i used a Main class which extends Application, whenever onCreate of my Activity gets

[android-developers] Re: Maintaining the state when changing the orientation

2010-05-19 Thread JP
On May 14, 2:54 am, Alok Kulkarni kulsu...@gmail.com wrote: I need to save many objects so basically onSavedInstanceState is not of full use . Like in your case, I have apps that need to keep (hundreds of) objects and state variables that require retention regardless of what's going on at the

Re: [android-developers] Re: Maintaining the state when changing the orientation

2010-05-14 Thread Alok Kulkarni
Thanks a lot guys for the information, I found this article http://peacemoon.wordpress.com/2009/08/23/android-developing-orientation-aware-android-applications/ I need to save many objects so basically onSavedInstanceState is not of full use . So i am going forward with

Re: [android-developers] Re: Maintaining the state when changing the orientation

2010-05-14 Thread Alok Kulkarni
Ok , i have succeeded in many parts of the app supporting the landscape mode, i am now facing a major problem in case of Handlers. I have many handlers for updating the UI . But they dont seem to work when i change Orientation.They behave a bit werdly actually.For example, i have a Play button

[android-developers] Re: Maintaining the state when changing the orientation

2010-05-14 Thread String
Are you aware that an orientation change will destroy and re-create your Activity? It's documented here: http://developer.android.com/resources/articles/faster-screen-orientation-change.html It sounds to me like your non ui thread is calling a handler in the Activity instance for the original

[android-developers] Re: Maintaining the state when changing the orientation

2010-05-13 Thread Charlie Collins
http://developer.android.com/intl/de/guide/topics/fundamentals.html#actlife Saving activity state When the system, rather than the user, shuts down an activity to conserve memory, the user may expect to return to the activity and find it in its previous state. To capture that state before the