Android Fragment Unable to go back -


i have app uses fragments tabs/viewpager

[tab 1][tab 2][tab 3] 

tab2 has listview , in onclick method of listview showing detail view following code

fragmenttransaction transaction = getchildfragmentmanager().begintransaction(); nextfragment nextfragment = new nextfragment(); transaction.replace(r.id.container, nextfragment); transaction.addtobackstack(null); transaction.commit(); 

the issue in nextfragment when use hardware button whole app closes?

i'm not sure why doesn't let return when pressed, i've done in application following:

i have overriden onbackpressed action , created check once pressed , user in fragment wants return from, create fragment transaction previous fragment. have done because needed update previous fragment, i'm sure there better way solve problem.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -