android - Start Fragment before hand -


i have parent fragment p contains 10 buttons each on clicking replace container in p child fragments c1 c10. should able navigate c1 c2 on clicking next in action bar. able achieve since each of child fragment having heavy initialization (loading svg, surfaceview etc..) transition not smooth. possible start next fragment i.e. c2 when in c1 , put in paused state can resumed directly when next in c1 clicked.

this someway similar offscreenlimit in viewpager when have seen view pager source code doesn't replace existing fragment scroll view new fragment x.

replacing existing framework viewpager shown here 1 possible solution requires lot of changes existing code base , last thing wish do

you can start fragments when create activity, call it.

do know how inicialize fragment?

if not:

fragment c1 = fragmentc1.newinstance(); fragment c2 = fragmentc2.newinstance(); fragment c3 = fragmentc3.newinstance(); ... 

then when click in button send information wich 1 want open, u know how chenga fragment when in one? need code it?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -