嗨,我对Android Drawable类的两种方法感到困惑
getIntrinsicHeight()
getIntrinsicWidth()
Run Code Online (Sandbox Code Playgroud)
api定义说 http://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicHeight()
内在高度/宽度是什么意思?我的意思是它是实际图像的宽度?
我似乎无法让我的ImageView以原始大小显示其源图像.ImageView看起来像这样:
<ImageView
android:id="@+id/Logo"
android:src="@drawable/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ImageView>
Run Code Online (Sandbox Code Playgroud)
源图像宽140像素,但在Nexus One的屏幕上,宽度为480像素,占用了宽度的一半.使用px或dp中的绝对值来表示宽度和高度不会改变任何值.从升级看,图像看起来也非常抗锯齿.为什么会发生这种情况,我该如何预防呢?