android - Issue with popBackStack and orientation change -


i have problem fragments , stack after orientation change. in app add new fragment stack after button click this:

getfragmentmanager().begintransaction().add(r.id.fl_root_calendar_container,                                 dayfragment.newinstance(monthdayview.getdatetime(), mcalendarlistener), dayfragment.tag).                                 addtobackstack(null).settransition(fragmenttransaction.transit_fragment_open).commit(); 

if click on button revert transaction after orientation change following code:

fragmentmanager fm = getfragmentmanager();    if (fm.getbackstackentrycount() > 0) {        fm.popbackstack();    } 

i see previous fragment again. everything's fine. views stretched or compressed after changing landscape/portrait view. i'm not using

setretaininstance(...) 

the lifecycle callback

oncreateview(...) 

is called in previous fragment after orientation change, views inside restored fragment haven't changed sizes due current orientation. there way fix somehow?


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -