首先,我想提前道歉,因为我确信以前曾经问过这类问题,但即使我在这些问题上寻找约2周,我也无法弄清楚我做错了什么.
这是我在活动中加载图像的地方:
ImageView image = (ImageView) findViewById(R.id.shop_Image) ;
image.setScaleType(ImageView.ScaleType.CENTER_CROP) ;
String mDrawableName = data.vec.elementAt(id).fuenf ;
if ( mDrawableName.equals("leer") )
mDrawableName = "ic_launcher" ;
int resID = getResources().getIdentifier(mDrawableName , "drawable", etPackageName());
image.setImageResource(resID) ;
Run Code Online (Sandbox Code Playgroud)
这是xml文件:
<LinearLayout
android:id="@+id/shop_Layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FDFDFD"
android:orientation="vertical" >
<ImageView
android:id="@+id/shop_Image"
android:contentDescription="@string/shop_image"
android:layout_width="match_parent"
android:layout_height="400dp"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:src="@drawable/ic_launcher" />
[...]
Run Code Online (Sandbox Code Playgroud)
这些是结果:
在Galaxy Nexus,Nexus 5或Samsung S3上,它看起来像这样:

在Razr I或HTC Desire X上,它看起来像这样:

我知道上面显示图像正确的设备有至少4.7英寸的显示器,而模糊图像的显示器都有4.3英寸或4英寸.
即使我将这些图像放在不同的可绘制文件夹中,我仍然会得到这些令人不快的结果.
如果需要进一步的代码示例,请告诉我.
PS:抱歉缺少突出显示,我还是新手:)
layout android android-layout android-imageview android-screen-support
我想知道是否有办法在Android Studio中使用可以从Android Things网站下载的系统映像设置模拟器.我已经有了一个Raspberry Pi 3,但我总是把它插入电视,这根本不是很实用.这就是我要问的原因.