Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid. dp's don't do their job
    primarykey
    data
    text
    <ol> <li>New -> Android project for testing the problem</li> <li><p>Code for <strong>Test.java</strong>:</p> <p>package test.density.yeah;</p> <pre><code>import android.app.Activity; import android.os.Bundle; public class TestActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } </code></pre></li> <li><p>Code for <strong>main.xml</strong>:</p> <p> </p> <pre><code>&lt;ImageButton android:background="@null" android:src="@drawable/icon" android:layout_width="200dp" android:layout_height="200dp"&gt; &lt;/ImageButton&gt; </code></pre></li> <li><p>Started emulator with settings:</p></li> </ol> <p>Resolution - <strong>480x800</strong></p> <p>Avstracted LCD Density - <strong>190</strong></p> <p><strong>RESULT</strong>:</p> <p><a href="http://cs5961.userapi.com/u68152416/-3/y_ef134df2.jpg" rel="nofollow">http://cs5961.userapi.com/u68152416/-3/y_ef134df2.jpg</a></p> <p>After that I've started emulator with such settings:</p> <p>Resolution - <strong>480x800</strong></p> <p>Avstracted LCD Density - <strong>240</strong></p> <p><strong>RESULT</strong>:</p> <p><a href="http://cs5961.userapi.com/u68152416/-3/y_8b99507b.jpg" rel="nofollow">http://cs5961.userapi.com/u68152416/-3/y_8b99507b.jpg</a></p> <p>Emulator settings for the first test mathes my HTC HD2 characteristics and second is the same as the HTC Sensation XL is. When running this test app on them it is the same problem. <strong>HD2 (480x800, 190dpi) - small image</strong>, <strong>Sensation (480x800, 240dpi) - huge image</strong>.</p> <p>So why "<strong>density independent pixels</strong>" do not work?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload