You can create different graphic objects for use at different pixel densities. Android treats mdpi (160 pixels/inch) as the base density. So for mdpi devices, 1 dp = 1 pixel. At higher densities, there are more pixels per inch (240 for hdpi, 320 for xhdpi). Android attempts to make graphic images occupy the same physical dimensions on the screen regardless of the device pixel density. So if all it finds is an mdpi resource, and the device is hdpi, it will scale the graphic by 240/160 = 150%, and it will double the size of the graphic for xhdpi.
If you don't want this automatic scaling (which can make graphics look poor), you can simply supply your own version of graphic resources for use at higher densities. These graphics should be of the same size that Android would scale an mdpi resource.
Note that the pixels/inch that was stored in the image file has nothing to do with this. It's all based on where you put the graphics files in the resources directory for your project. Any graphics placed in res/drawable are assumed to be properly sized for mdpi displays, as are graphics placed in res/drawable-mdpi. Image files that it finds in res/drawable-hdpi are assumed to be properly sized for hdpi displays, etc. When your program runs on a particular device, Android will first look for a graphic that matches the display density of that device. If it does not find one but instead finds one for a different density, it will use that and automatically scale the image based on the above rules.
When you request a resource for which you provide alternatives, Android selects which alternative resource to use at runtime, depending on the current device configuration. To demonstrate how Android selects an alternative resource, assume the following drawable directories each contain different versions of the same images:
1) Once installed on a device, each Android application lives in_______?
c) security sandbox
d)None of the above
2)Parent class of Activity?
3)What are the Direct subclasses of Activity?
f) all the aove
4)What are the indirect Direct subclasses of Activity?
d)All the above
5)Parent class of Service?
6)What are the indirect Direct subclasses of Services?
7)Which component is not activated by an Intent?
1. bmgr tool is used to
a)take backup of the applications
b)to restore operations
c)wipe archived data for a specific application
d)all of the above
2. foreground service
a)starts when you call start foreground()
b)may or may not provide a notification for the status bar
c)notification can't be dismissed unless the service is either stopped or removed from the
d)both a & c
3. A1,A2,A3 and A4 are activities called using intents.Then A1-A4-A2--A3.A4 calls A2 with
intent flag FLAG_ACTIVITY_NO_HISTORY.When finish method is called on A3, What will be the
currtent running activity?
4. A1,A2,A3 and A4 are activities called using intents.Then A1-A2-A4--A3.A2 calls A4 with
intent flag FLAG_ACTIVITY_CLEAR_TOP.When finish() method is called on A3, what will be the
current running activity?
5. A1,A2,A3 and A4 are activities called using intents.Then A1-A2-A3-A4. A3 calls A4 with no