What is a NinePatch (9-patch) image?
It is a resizable bitmap resource that can be used for backgrounds or other s on a device. NinePatch class permits drawing a bitmap in nine sections. The 9-patch s have an extension as .9.png. It allows extensions in 9 ways, i.e., 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.
Why cannot you run the standard Java bytecode on Android?
Android uses Dalvik virtual machine (DVM) which requires a special bytecode. First of all, we have to convert Java class files into Dalvik executable files using an Android tool called ‘dx’. In normal circumstances, developers will not be using this tool directly; build tools will care for the generation of DVM compatible files.
Master Most in Demand Skills Now !
1 Briefly describe some ways that you can optimize View usage.
There are a number of methods, but the ones that tend to have the most impact are:
Q What is the significance of the .dex file?Â
The various Android programs and their implementation strategies form an integral part of Android team lead interview questions. A .dex file (Dalvik Executable file) compiles Android programs which are then zipped into a .apk file. A .dex file is created by translating compiled Java applications and optimized for efficient storage.
DDMS stands for Dalvik Debug Monitor Server. It is a debugging tool in the Android system that offers the following array of debugging features:
Q What is Android Debug Bridge?
Android Debug Bridge is a command-line tool. It is used to communicate with the emulator instance. ADB controls your device over USB from a computer, installs and uninstalled apps, copies files back and forth, and more. It is a client-server program that incorporates three components: client, server, and daemon.
Q1 What are broadcast receivers? How is it implemented?
It is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.
How would you create a multi-threaded Android app without using the Thread class?
If you only need to override the run()
method and no other Thread methods, then you should implement Runnable.
In particular, be on the lookout for an Android developer demonstrating an understanding that you should only extend from a class when you need to modify some of its functionality.
28) How can the ANR be prevented?
One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.