Android Interview Questions and Answers
Question - 11 : - What items are important in every Android project?
Answer - 11 : -
These are the essential items that are present each time an Android project is created:
- AndroidManifest.xml
- build.xml
- bin/
- src/
- res/
- assets/
Question - 12 : - What is the importance of XML-based layouts?
Answer - 12 : -
The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.
Question - 13 : - What are containers?
Answer - 13 : -
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.
Question - 14 : - What is Orientation?
Answer - 14 : -
Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.
Question - 15 : - What is the importance of Android in the mobile market?
Answer - 15 : -
Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.
Question - 16 : - What do you think are some disadvantages of Android?
Answer - 16 : -
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.
Question - 17 : - What is adb?
Answer - 17 : -
Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.
Question - 18 : - What are the four essential states of an activity?
Answer - 18 : -
- Active – if the activity is at the foreground
- Paused – if the activity is at the background and still visible
- Stopped – if the activity is not visible and therefore is hidden or obscured by another activity
- Destroyed – when the activity process is killed or completed terminated
Question - 19 : - What is ANR?
Answer - 19 : -
ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.
Question - 20 : - Which elements can occur only once and must be present?
Answer - 20 : -
Among the different elements, the “and” elements must be present and can occur only once. The rest are optional, which can occur as many times as needed.