[android-developers] Re: fragment transactions in onLoadFinished()

2012-02-29 Thread Nadeem Hasan
I have this in my base Activity: protected View createContentView( int id ) { View view = inflate( id ); return createContentView( view ); } public View createContentView( View view ) { FrameLayout root = new FrameLayout( this ); root.setLayoutParams(ne

Re: [android-developers] Re: fragment transactions in onLoadFinished()

2012-02-28 Thread Dianne Hackborn
It's already been mentioned: http://developer.android.com/reference/android/app/FragmentTransaction.html#commitAllowingStateLoss() Which is explicitly referenced from the commit documentation: http://developer.android.com/reference/android/app/FragmentTransaction.html#commit() You just need to

[android-developers] Re: fragment transactions in onLoadFinished()

2012-02-28 Thread Cybrosys
Well this is just ridiculous. I have a login screen and when the user presses "Log in" I want to display a ProgressDialogFragment saying "Logging in. Please wait...". I have a AsyncTaskLoader that does the authentication against a Web Service and returns the result. Once I have the result I wan

Re: [android-developers] Re: fragment transactions in onLoadFinished()

2012-02-13 Thread ashughes
I am also trying to figure out the correct (or suggested) way to perform a fragment transaction from onLoadFinished(). I understand that it is "bad user experience" to cause the UI to change in some way the user is not expecting while they are doing something. However I have a dual-pane view co

Re: [android-developers] Re: fragment transactions in onLoadFinished()

2011-11-11 Thread Dianne Hackborn
It's a bad user experience to show a dialog (or do any other major shift in the UI) as the result of a loader. Here is what you are doing: setting off some operation to run in the background for an in-determinant amount of time, which upon completion may throw something in front of the user yankin

[android-developers] Re: fragment transactions in onLoadFinished()

2011-11-11 Thread DH
I'm trying to display a DialogFragment and am facing the same problem. How do you approach this? My loader gets data from our server and I would like to display an error dialog when for example a network problem occurs. Thanks. David. On Sep 14, 11:17 pm, Dianne Hackborn wrote: > postDelayed