Fragment are the android component that are meant to make the UI more flexible and dynamic screens.
In this Android Video tutorial we will learn :-
What are fragments
1) Component that is used to implement the complex UI in a simpler manner.
like activity, fragments also posses a lifecycle
Areas where we can use fragments.
1) Where there is a need to show multipane UI.
2) The part which is use in many across the application.
How to add fragments in the activity
1) During runtime
2) staticaly via xml
How to pass on the values to fragments
1) send data using "setArguments(args)" // args is the bundle that hod the data
2) get data in receipent fragment via "getArguments()"