title: find out device display parameters on android - picking up wrong layout
body: <p>I have several layouts in my Android application. All layouts have a tag to identify them during runtime, using the following code:</p>
  
  <pre><code>RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.RelativeLayout01);
  
  if(relativeLayout.getTag() != null)
  {
      Log.v("Layout", (String) relativeLayout.getTag());
  }
  </code></pre>
  
  <p>The following layouts are provided: "layout", "layout-long-port-hdpi-finger-800x480", "layout-long-port-hdpi-finger-854x480", "layout-normal-port-hdpi-finger-v15", "layout-normal-port-mdpi-finger-480x320".</p>
  
  <p>When I use the Galaxy SIII emulator then the layout layout-normal-port-hdpi-finger-v15 will be picket.</p>
  
  <p>Now I have downloaded the <a href="http://developer.samsung.com/android/tools-sdks/Samsung-GALAXY-S2-Skin-for-handset-emulation" rel="nofollow">Galaxy S II</a> emulator skin from the Samsung website and to my knowledge it is has a screen dimension of 480x800. It however dies not pick up the layout-long-port-hdpi-finger-800x480 layout, but rather always the default from the "Layout" directory.</p>
  
  <p><strong>Question:</strong> How can you find out what display requirements a device or an emulator has, so that I can fabricate a correct layout definition? Is there a way to debug / log these requirements?</p>
  
  <p>Thanks for helping</p>