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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -