Java Android-图像视图-Galaxy选项卡2上的黑色图像

Java Android-图像视图-Galaxy选项卡2上的黑色图像,java,android,android-studio,imageview,galaxy-tab,Java,Android,Android Studio,Imageview,Galaxy Tab,除了Galaxy Tab 2,我的应用程序在每台设备上都运行良好 这是Galaxy选项卡2上的外观: 我尝试过每一种解决方案,但仍然是一样的;/ imageView.setImageResource(songsList.get(position.getIconId())在添加图像的位置发布更多代码。列表项是否有xml?刚刚添加了我的视图行xml。请检查是否手动添加资源imageView.setImageResource(R.drawable.sample);是否正确放置图像并将代码放在维护图标

除了Galaxy Tab 2,我的应用程序在每台设备上都运行良好

这是Galaxy选项卡2上的外观:

我尝试过每一种解决方案,但仍然是一样的;/


imageView.setImageResource(songsList.get(position.getIconId())在添加图像的位置发布更多代码。列表项是否有xml?刚刚添加了我的视图行xml。请检查是否手动添加资源imageView.setImageResource(R.drawable.sample);是否正确放置图像并将代码放在维护图标id的位置。
imageView.setImageResource(R.drawable.sample)仍然是相同的问题。甚至尝试通过以下方式添加图像:
imageView.setImageDrawable()。还用更多信息编辑了我的帖子:(在添加图像的位置发布更多代码。列表项是否有xml?刚刚添加了my view_row xml。请检查是否手动添加资源imageView.setImageResource(R.drawable.sample);是否正确放置图像,并将代码放在维护图标id的位置。
imageView.setImageResource(R.drawable.sample);
仍然存在相同的问题。甚至尝试使用以下方式添加图像:
imageView.setImageDrawable();
。还使用更多信息编辑了我的文章:(
@Override
public View getView(int position, View view, ViewGroup parent) {
    if (view == null) {
        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        view = inflater.inflate(R.layout.view_row, parent, false);
    }

    imageView = (ImageView) view.findViewById(R.id.list_image);
    imageView.setImageResource(songsList.get(position).getIconId());

    Log.i("SongBox", "" + songsList.get(position).getIconId());

    return view;
}
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="150dp"
    android:background="@android:drawable/dialog_holo_light_frame"
    android:orientation="vertical"
    android:padding="5dp">

    <ImageView
        android:id="@+id/list_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:contentDescription="@string/desc"
        android:scaleType="centerCrop" />

    <RelativeLayout
        android:id="@+id/rowRL"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/list_text"
            style="@style/UiTextView"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:layout_alignParentBottom="true"
            android:background="#90FAEBD7"
            android:gravity="center"
            android:textSize="22sp" />

        <ImageView
            android:id="@+id/list_lock"
            android:layout_width="70dp"
            android:layout_height="wrap_content"
            android:layout_above="@+id/list_text"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:layout_margin="5dp"
            android:src="@drawable/icon_lock_glow" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/border" />
</FrameLayout>
public class Songs {

    public List<ISong> toList() {
        return Arrays.asList(
                new Song1(),
                new Song2(),
                new Song3(),
                new Song4(),
                new Song5(),
                new Song6(),
                new Song7(),
                new Song8(),
                new Song9(),
                new Song10(),
                new Song11(),
                new Song12(),
                new Song13(),
                new Song14(),
                new Song15(),
                new Song16(),
                new Song17(),
                new Song18(),
                new Song19(),
                new Song20());
    }

    public ISong getSong(int listPosition) {
        return toList().get(listPosition);
    }
}
public class Song4 implements ISong {

    @Override
    public boolean isUnlocked() {
        return true;
    }

    @Override
    public int getNameId() {
        return R.string.song_4;
    }

    @Override
    public int getRawId() {
        return R.raw.song4;
    }

    @Override
    public int getIconId() {
        return R.drawable.box_song4;
    }

    @Override
    public int getBackgroundId() {
        return R.drawable.background_song4;
    }
}