Fragments and Navigation Components

0.0(0)
Studied by 2 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

flashcard set

Earn XP

Description and Tags

This set of flashcards covers the fundamental concepts of Fragments, their lifecycle states, FragmentManager operations, and the Navigation Components as presented in Lecture 7.

Last updated 1:24 PM on 5/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Fragment

A block of UI, with its own lifecycle, that can be reused within different activities to create modular user-interface components.

2
New cards

onInflate

Method called only to define a fragment directly in the layout using the tag; it saves configuration parameters and attributes defined in the XML layout file.

3
New cards

onAttach

Method called as soon as the fragment is attached to the father activity, used to store the reference about the activity.

4
New cards

onCreate

An important step where the fragment is in the creation process; it can be used to start threads to retrieve data from sources like a remote server.

5
New cards

onCreateView

The method called when the fragment creates its view hierarchy and the layout is inflated inside the fragment.

6
New cards

onActivityCreated

Method that notifies when the father activity is created and ready for use, meaning the activity is active and can be used.

7
New cards

onStart

Phase where the fragment is visible but is not yet interacting with the user.

8
New cards

onResume

Method called when the fragment is ready to interact with the user and is up and running.

9
New cards

onPause()

Lifecycle method for fragments that is similar to Activity.onPause().

10
New cards

onDestroyView()

Final fragment cleaning up method called if the OS decides to destroy the fragment view.

11
New cards

onDestroy()

Called when all active connections should be released because the fragment is close to shutting down.

12
New cards

onDetach

Method used to detach the fragment from the activity.

13
New cards

onStop()

Lifecycle method called when the fragment is no longer visible.

14
New cards

FragmentManager

A component in the Activity used to handle fragments, allowing them to be added, removed, replaced, or found at runtime.

15
New cards

Transaction

The operation required to activate any kind of manipulation (add, remove, replace) on a fragment through the FragmentManager.

16
New cards

Navigation

The interactions that allow users to navigate across, into, and back out from different pieces of content within an app.

17
New cards

Navigation graph

An XML resource file containing all navigation-related information, including destinations and the possible paths a user can take.

18
New cards

Destinations

The individual content areas within an app defined in the navigation graph.

19
New cards

NavHost

An empty container that displays destinations from the navigation graph.

20
New cards

NavHostFragment

The default NavHost implementation that displays fragment destinations.

21
New cards

NavController

An object that manages app navigation within a NavHost and orchestrates the swapping of destination content.