1

We are developing an android application. Actually we are iPhone developers. One challenge we faced during the android development than iOS development is, the wide variety of devices the android application going to be used. From the link http://developer.android.com/guide/practices/screens_support.html we got some useful information.

1) But we think that the testing effort we need to more than that of iOS in android based on the screen sizes. Can somebody suggest us to the method the do various sized device testing for android devices.

2) Or at least we can inform our customer that we will test in such devices only. But our point is how can we say that, like device names like Samsung S2, Samsung Galaxy Note or Devices like 640X480 size, 320X240 size etc? Please advise us.

3) Do we have any size specification for images for small, normal, large, xlarge and ldpi, mdpi, hdpi, xhdpi ?

Itzik Gili
  • 324
  • 3
  • 16
developerXXX
  • 689
  • 3
  • 7
  • 18

1 Answers1

0

Developing for multiscreen, First make sure that the AndroidManifest.xml specifies the correct target SDK. For android 2.2, the target SDK level is 8. For processing it requires at least SDK level 7 to run.

<user-sdk android:minSdkversion="7" android:targetSdkversion="8"></user-sdk>

Use this <user-sdk> element, so that the platform will consider that your android app is for 2.2, otherwise, it takes it as for Android 1.5.

The Display metrics values for "normal-hdpi" screen is

DisplayMetrics{density=1.5, width=854, height=480, scaledDensity=1.5, xdpi=240.0, ydpi=240.0}

For size classification use this configuration class

Configuration config = getResources().getConfiguration();
int size = config.screenLayout & config.SCREENLAYOUT_SIZE_MASK;
if (size == config.SCREENLAYOUT_SIZE_SMALL)
{     
  // use special layout for small screens 
}

Hopefully this solution will be useful to you.

laalto
  • 150,114
  • 66
  • 286
  • 303