If we call the getActivity method inside a user-defined Fragment class and assign the return value to a user-defined Activity class, the Fragment class is not usable with a different user-defined Activity class. To make it reusable with a different user-defined Activity class, we use an interface inside the user-defined Fragment class and have our user-defined Activity class implement that interface.
Correct Answer:
Verified
Q15: What XML attribute can we use to
Q16: If we want to close a keyboard
Q17: What method of the Activity class returns
Q18: What method of the Fragment class returns
Q19: It is possible to define a fragment
Q21: To get a reference to a fragment
Q22: A fragment can be defined in an
Q23: If we intend to call a method
Q24: The _ method of the InputMethodManager class
Q25: The IBinder interface encapsulates a(n) _ object.
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents