Home > Mobile > How Android to the layout of the Activity nested fragments in the layout
How Android to the layout of the Activity nested fragments in the layout
Time:10-07
Figure A:
Figure B:
How to figure B (the Activity layout) nested into the figure A layout (fragments) in the red areas
CodePudding user response:
You can use the include tag
CodePudding user response:
I am not going to the XML file directly into fragments, I also operating in the activity, I am want to be in fragments with code to the activity layout sets in
CodePudding user response:
Directly in nested fragments bai fragments
CodePudding user response:
The first thing to understand the significance of using fragments? Previously developed each class is an Activity that quite a waste of resources? If you need to use fragments, then the APP there and only one Activity can; The meaning of the fragments is fragmented, more to save resources, this was a fragment, you must make the Activity go in? So I think it is not necessary to use fragments, because it doesn't make any sense... Directly with the activty is worse than you, because you don't understand Frament; A pure hand, don't like do not spray;
CodePudding user response:
Activity can be realized, fragments can also realize
CodePudding user response:
Only the activity nested fragments, not the opposite