


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Fragments in fundamentals of c language
Typology: Essays (university)
1 / 4
This page cannot be seen from the preview
Don't miss anything!
1. activity_main.xml xml CopyEdit
getSupportFragmentManager().beginTransaction() .replace(R.id.fragment_container, new FragmentA()) .commit(); } } }
3. fragment_a.xml xml CopyEdit
android:gravity="center">
6. FragmentB.java java CopyEdit package com.example.fragmentapp; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.fragment.app.Fragment; public class FragmentB extends Fragment { public FragmentB() {} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_b, container, false); } }