Question : Which of the following is correct about XML layout files?
1. In order to display a Ul defined in the XML layout file "main.xml", call the setContentView method of theActivity with the parameter string "main.xml".
2. There is no distinction between implementation of the layout definition by code, or by XML layout file.
3. In an Eclipse project using the ADT plugin, the XML layout file is found in the /res/layout directory.
4. Layout information written in the XML layout file will be converted into code by the Android platform whenthe screen is displayed.
Correct Answer : Get Lastest Questions and Answer : Explanation: After you've declared your layout in XML, save the file with the .xml extension, in your Android project's res/layout/ directory, so it will properly compile
Question : The DalvikVM core libraries are a subset of which of the following?
1. Java ME
2. Java SE
3. Java EE
4. JAX-WS
Correct Answer : Get Lastest Questions and Answer : Explanation: On an Android device, the Dalvik virtual machine usually executes embedded in the Android application framework. It's also possible to run it directly, just as you would a virtual machine on your desktop system The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimised for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx"
Dalvik is a discontinued[1] process virtual machine (VM) in Google's Android operating system that executes applications written for Android. Dalvik is an integral part of the Android software stack in Android versions 4.4 "KitKat" and earlier, which is typically used on mobile devices such as mobile phones and tablet computers, and more recently on devices such as smart TVs and wearables. Dalvik is open-source software, originally written by Dan Bornstein.
Programs for Android are commonly written in Java and compiled to bytecode for the Java virtual machine, which is then translated to Dalvik bytecode and stored in .dex (Dalvik EXecutable) and .odex (Optimized Dalvik EXecutable) files; related terms odex and de-odex are associated with respective bytecode conversions. The compact Dalvik Executable format is designed for systems that are constrained in terms of memory and processor speed.
The successor of Dalvik is Android Runtime (ART), which uses the same bytecode and .dex files (but not .odex files), with the succession aiming at performance improvements transparent to the end users. The new runtime environment was included for the first time in Android 4.4 "KitKat" as a technology preview,[4][5] and replaced Dalvik entirely in later versions; Android 5.0 "Lollipop" is the first version in which ART is the only included runtime.
Question : Which of the following is correct about file access in the Android system?
1. Generally, files are handled as dedicated resources per each application.
2. Files created by an application can be directly accessed by any application.
3. The content of file created by application cannot be accessed by any other application.
4. You can only access a file from within an Activity.