Home > Mobile >  Android small white, solving click a button to jump to another fragment in fragments, but don't
Android small white, solving click a button to jump to another fragment in fragments, but don't

Time:09-26

Novice, a lot of places is very rough, please don't spray, detailed answer, thank you!
main page: first_fragment. XML, yellow circle to click on the button, click to jump to third_fragment. XML display page ;




first_fragment. XML corresponding FirstFragment. Java for there is a return view;



Third_fragment. XML corresponding ThirdFragment. Java for below
[img=https://img-bbs.csdn.net/upload/201912/25/1577244604_772983.png] [/im

Just one more months of graduation, do not to come out an estimated not graduate, and help children

CodePudding user response:

Finally a figure like didn't show that I posted in the comments

CodePudding user response:

Choose which fragments can only be set in the Activity, if your fragments belong to the same Activity, can write a callback interface in fragments, implementation in the Activity, choose the fragments logic written in the Activity

CodePudding user response:

Do you want the container's activity or fragments of the operation, rather than in fragments of operation at the same level
  • Related