MCQs / Computer Science / Windows Mobile, Eclipse and Fragments
Windows Mobile, Eclipse and Fragments MCQs — Computer Science 40 multiple-choice questions on Windows Mobile, Eclipse and Fragments from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.
1. Fragments were introduced in Android: 3.0 Honeycomb 5.0 Lollipop 8.0 Oreo 1.6 Answer: A) 3.0 Honeycomb
Explanation: Honeycomb (tablets) introduced fragments.
Discuss this question
2. Which call navigates to another destination with the Navigation component? replace(R.id.detail) setContentView(R.id.detail) startActivity(R.id.detail) findNavController().navigate(R.id.detailFragment) Answer: D) findNavController().navigate(R.id.detailFragment)
Explanation: NavController.navigate() moves between destinations.
Discuss this question
3. The design pattern popularised by Microsoft with XAML data binding is: Singleton MVC Observer only MVVM Answer: D) MVVM
Explanation: Model–View–ViewModel came from the WPF/XAML world.
Discuss this question
4. The most common language for Windows Phone app development was: C Dart Kotlin Swift Answer: A) C
Explanation: Windows Phone apps were mainly written in C with XAML.
Discuss this question
5. Windows Mobile 6.x applications were typically written using: C/C++ or the .NET Compact Framework HTML only Swift Kotlin Answer: A) C/C++ or the .NET Compact Framework
Explanation: Windows Mobile apps used native C/C++ or the .NET Compact Framework.
Discuss this question
6. Which fragment callback is the first to be called when it is linked to its activity? onCreateView() onAttach() onViewCreated() onStart() Answer: B) onAttach()
Explanation: onAttach() is called when the fragment is associated with its host.
Discuss this question
7. Swipeable tabs where each page is a fragment are usually built with: WebView ListView and Adapter ViewPager2 and TabLayout Toast and Snackbar Answer: C) ViewPager2 and TabLayout
Explanation: ViewPager2 hosts fragments as swipeable pages, and TabLayout shows the tabs.
Discuss this question
8. Google officially ended support for Eclipse ADT in: 2022 2015 2018 2010 Answer: B) 2015
Explanation: Support ended at the end of 2015.
Discuss this question
9. Windows Phone 7 introduced which design language? Holo Aqua Material Metro (Live Tiles) Answer: D) Metro (Live Tiles)
Explanation: Windows Phone used the Metro design with Live Tiles.
Discuss this question
10. Which method commits a fragment transaction? execute() commit() save() run() Answer: B) commit()
Explanation: commit() schedules the transaction.
Discuss this question
11. replace(R.id.fragmentcontainer, ProfileFragment()) will: Add ProfileFragment on top of the existing one Remove the fragment(s) in that container and add ProfileFragment Hide the container Open a new activity Answer: B) Remove the fragment(s) in that container and add ProfileFragment
Explanation: replace = remove existing + add new.
Discuss this question
12. If the host activity is paused, its fragments: Keep running in the foreground Are also paused Move to another activity Are destroyed immediately Answer: B) Are also paused
Explanation: Fragment lifecycles follow the host activity's lifecycle.
Discuss this question
13. Which is TRUE about fragments? They can exist without an activity They cannot have layouts They must be declared in the manifest like activities They must be hosted by an activity (or another fragment) Answer: D) They must be hosted by an activity (or another fragment)
Explanation: Fragments always live inside a host.
Discuss this question
14. DDMS in Eclipse was used for: Designing icons Writing Kotlin Publishing to Play Debugging and monitoring devices (logs, threads, file explorer) Answer: D) Debugging and monitoring devices (logs, threads, file explorer)
Explanation: Dalvik Debug Monitor Server provided device monitoring and debugging.
Discuss this question
15. Before Android Studio, Android apps were developed in Eclipse using which plug-in? SwiftPM XNA ADT (Android Development Tools) Gradle Plugin Answer: C) ADT (Android Development Tools)
Explanation: The ADT plug-in added Android tools to Eclipse.
Discuss this question
16. The Fragment Result API uses which pair of methods? setFragmentResult() and setFragmentResultListener() putExtra() and getStringExtra() commit() and rollback() onSaveInstanceState() and onRestoreInstanceState() Answer: A) setFragmentResult() and setFragmentResultListener()
Explanation: Fragments can pass results through the FragmentManager with these methods.
Discuss this question
17. The IDE used to build Windows Phone apps was: Xcode Android Studio Eclipse only Visual Studio Answer: D) Visual Studio
Explanation: Visual Studio with the Windows Phone/Windows SDK was used.
Discuss this question
18. A major reason for the failure of Windows Phone was the: "App gap" – too few popular apps Absence of cameras Use of C Lack of touch screens Answer: A) "App gap" – too few popular apps
Explanation: Without key apps users stayed away, and without users developers stayed away.
Discuss this question
19. Which fragment callback inflates and returns the fragment's layout? onCreateView() onDetach() onCreate() onAttach() Answer: A) onCreateView()
Explanation: onCreateView() returns the root view of the fragment.
Discuss this question
20. In the Navigation component, destinations and actions are defined in a: Navigation graph (XML) strings.xml Manifest Gradle file Answer: A) Navigation graph (XML)
Explanation: The navigation graph describes all destinations and actions.
Discuss this question
21. The safest place to find views and set listeners in a fragment is: onAttach() onDestroy() onDetach() onViewCreated() Answer: D) onViewCreated()
Explanation: onViewCreated() runs after the view hierarchy is created.
Discuss this question
22. Microsoft ended support for Windows 10 Mobile on: 31 December 2022 1 January 2015 30 June 2025 14 January 2020 Answer: D) 14 January 2020
Explanation: Support ended on 14 January 2020.
Discuss this question
23. A BottomNavigationView normally shows how many top-level destinations? 3 to 5 Unlimited 10 to 15 1 Answer: A) 3 to 5
Explanation: Material guidelines recommend 3 to 5 bottom navigation items.
Discuss this question
24. Android Studio is based on: NetBeans Eclipse IntelliJ IDEA Visual Studio Code Answer: C) IntelliJ IDEA
Explanation: Android Studio is built on JetBrains IntelliJ IDEA.
Discuss this question
25. Inside an activity, which property gives the FragmentManager for its fragments? intentManager childFragmentManager fragmentManagerOf() supportFragmentManager Answer: D) supportFragmentManager
Explanation: Activities use supportFragmentManager.
Discuss this question
Page 1 of 2 Next
Practise Windows Mobile, Eclipse and Fragments MCQs
More Computer Science chapters