title: android - layout looks messed up in some devices
body: <p>I'm having a very weird problem with a layout. It looks as designed in eclipse XML editor and in my Samsung galaxy but it's messed up in my old phone xperia x10 mini. I can only assume that this would occur in other devices too.</p>
  
  <p>If someone could help fix this I would be grateful.</p>
  
  <p>Here are the two screenshots and the XML code.</p>
  
  <p>how it looks in eclipse layout editor and in my Samsung galaxy S4 mini</p>
  
  <p><a href="https://i.stack.imgur.com/m8XbC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8XbC.png" alt="enter image description here"></a> </p>
  
  <p>how it looks in Sony xperia x10 mini</p>
  
  <p><a href="https://i.stack.imgur.com/fJmcw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fJmcw.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:orientation="vertical"
      android:gravity="center"
      android:layout_height="wrap_content" &gt; 
  
      &lt;FrameLayout
          android:layout_marginTop="7dp"
          android:layout_gravity="center" 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"&gt;
  
          &lt;View  android:layout_marginTop="19dp"  android:layout_marginLeft="19dp"  android:layout_height="249dp" android:layout_width="2dp"    android:background="#B2CFEF"/&gt;
          &lt;View  android:layout_marginTop="19dp"  android:layout_marginLeft="189dp" android:layout_height="249dp" android:layout_width="2dp"    android:background="#B2CFEF"/&gt;
          &lt;View  android:layout_marginTop="18dp"  android:layout_marginLeft="20dp"  android:layout_height="2dp"   android:layout_width="170dp"  android:background="#B2CFEF"/&gt;
          &lt;View  android:layout_marginTop="267dp" android:layout_marginLeft="19dp"  android:layout_height="2dp"   android:layout_width="171dp"  android:background="#B2CFEF"/&gt;
  
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_lu"                                     android:layout_marginTop="52dp"   /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_lc"                                     android:layout_marginTop="124dp"  /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_ld"                                     android:layout_marginTop="197dp"  /&gt;
  
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_ru"  android:layout_marginLeft="170dp"  android:layout_marginTop="52dp"   /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_rc"  android:layout_marginLeft="170dp"  android:layout_marginTop="124dp"  /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_rd"  android:layout_marginLeft="170dp"  android:layout_marginTop="197dp"  /&gt;
  
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_tl"  android:layout_marginLeft="37dp"                                     /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_tc"  android:layout_marginLeft="84dp"                                     /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_tr"  android:layout_marginLeft="132dp"                                    /&gt; 
  
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_bl"  android:layout_marginLeft="37dp"   android:layout_marginTop="249dp"  /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_bc"  android:layout_marginLeft="84dp"   android:layout_marginTop="249dp"  /&gt;
          &lt;ImageView  style="@style/ta_img"  android:id="@+id/ta_br"  android:layout_marginLeft="132dp"  android:layout_marginTop="249dp"  /&gt;
  
      &lt;/FrameLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and this is the style of the ImageViews</p>
  
  <pre><code>&lt;style name="ta_img" &gt; 
          &lt;item name="android:layout_width"&gt;40dp&lt;/item&gt;
          &lt;item name="android:layout_height"&gt;40dp&lt;/item&gt;
          &lt;item name="android:clickable"&gt;true&lt;/item&gt;
          &lt;item name="android:src"&gt;@drawable/ta&lt;/item&gt;    
  &lt;/style&gt;
  </code></pre>
  
  <p>Any ideas???</p>