Re: [android-developers] Re: Fragment Transactions

2012-10-01 Thread Apurva Goyal
Also if I add the fragment then the backstack logic works well. But then my first fragment is not completely hidden by the second fragment that I add over it. On Mon, Oct 1, 2012 at 1:32 PM, Apurva Goyal wrote: > Thanks Blake. However when I try to replace one fragment with another > using this

Re: [android-developers] Re: Fragment Transactions

2012-10-01 Thread Apurva Goyal
Thanks Blake. However when I try to replace one fragment with another using this code, I am still not able to get backstack stuff working. Here is my new code- private void handleRuralRoutesClick(){ FragmentTransaction xact= getSupportFragmentManager().beginTransaction(); xact.rep

Re: [android-developers] Re: Fragment Transactions

2012-09-30 Thread G. Blake Meike
This code works: https://github.com/bmeike/ProgrammingAndroid2Examples/blob/master/SimpleFragment/src/com/oreilly/demo/android/pa/simplefragment/SimpleFragment.java G. Blake Meike Marakana The second edition of Programming Android is now available: http://shop.oreilly.com/product/0636920023005

Re: [android-developers] Re: Fragment Transactions

2012-09-29 Thread Apurva Goyal
Thanks Blake. The RouteCategoryFragment is not a splash screen. There is a separate splash screen activity with a button. Clicking that button launches another activity which has the RouteCategoryFragment. Please let me know what I need to do replace fragment and add it to backstack. Thanks Apurv

[android-developers] Re: Fragment Transactions

2012-09-28 Thread G. Blake Meike
I think you've misunderstood the use of the Fragment Tag. It looks like RouteCategoryFragment is the splash screen, yes? When someone clicks you want to replace it with a CountyListFragment? If so you need to use the same tag (probably COUNTY_TAG). That is the unique identifier for the frag

[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

[android-developers] Re: Fragment transactions, transitions and the back stack

2011-03-23 Thread Kelly Merrell
Thanks for the clarification Dianne. Is there a chance that these types of improvements/fixes could be released in updates to the compatibility lib faster than the platform releases? This would allow us to adopt the changes much faster than waiting for the full release. On Mar 22, 5:41 pm, Dianne

Re: [android-developers] Re: Fragment transactions, transitions and the back stack

2011-03-22 Thread Dianne Hackborn
Sorry custom animations are broken when popping the back stack. This will be fixed in a future release. Until then, you just won't be able to do this -- you will need to either stick with the standard transitions, or manually add/remove the fragments yourself. On Tue, Mar 22, 2011 at 3:32 PM, Ke

[android-developers] Re: Fragment transactions, transitions and the back stack

2011-03-22 Thread Kelly Merrell
Related bug report here: http://code.google.com/p/android/issues/detail?id=15623&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars On Mar 16, 9:54 am, Kelly Merrell wrote: > Hi All, > I am having trouble using or understanding how popping > FragmentTransactions off of the back stack handles th