2

我正在开发一个使用大图像(超过 2000 像素高度)的应用程序。我为不同的密度缩放制作了图像,并且在所有模拟器和物理手机上的测试都给出了很好的结果。全部,三星 Galaxy S3 实体手机除外。它拒绝正确渲染超过 2000px 高度的图像。(它绘制了图像的完全缩小版本)。在 S3 的模拟器上运行我的应用程序可以得到很好的结果。使图像高度小于 2000 像素也能正确显示图像。这种奇怪行为的原因是什么?

我正在为我的图像视图使用以下布局:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" >
      <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/test"
        android:text="@string/test"
        android:textSize="20dp" />
      <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
        <LinearLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >
 
            **<ImageView
                android:id="@+id/map"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="#FFFFFF"
                android:scaleType="center" />**
           </LinearLayout>                            
        </ScrollView>
   </LinearLayout>

图像工作正常的模拟器具有以下详细信息:

 Target: Google APIs (Google Inc) - API Level 15
 SD Card: size: 1024mb
 Skin:Built In: WXGA720
 Hardware:
        Abstracted LCD Density: 320
        VM application heap size: 48
        Device ram size: 1024
4

0 回答 0