Android 滑动加载映像不完整

Android 滑动加载映像不完整,android,gif,android-glide,Android,Gif,Android Glide,我使用Glide加载Gif,第三个栏显示不完整,它在第三个栏中显示白色区域,但没有显示。(英语很差,对不起),像这样亲爱的大家,我怎么解决 ScaleType="fitXY" Glide.with(context).load(R.drawable.loading).into(imageView); :使用图像视图 <pl.droidsonroids.gif.GifImageView android:layout_width="match_parent" androi

我使用Glide加载Gif,第三个栏显示不完整,它在第三个栏中显示白色区域,但没有显示。(英语很差,对不起),像这样亲爱的大家,我怎么解决

 ScaleType="fitXY"
 Glide.with(context).load(R.drawable.loading).into(imageView);

使用图像视图

<pl.droidsonroids.gif.GifImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/src_anim"
    android:background="@drawable/bg_anim"
    />

使用图像视图

<pl.droidsonroids.gif.GifImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/src_anim"
    android:background="@drawable/bg_anim"
    />

从drawable加载Gif图像的步骤
  • 您需要将
    加载
    Gif图像移动到项目的
    res/raw
    文件夹
    ( 如果您的项目在资源中没有直接的
    raw
    文件夹,那么只需制作一个并将gif放入其中即可)

  • 然后您只需用一行代码加载gif即可

  • 编辑:-

    Gif图像中的白色区域可能是因为使用了streatching Gif,这是我的设备中的外观

    或者,您可以查看此开源库以加载动画

    从drawable加载Gif图像的步骤
  • 您需要将
    加载
    Gif图像移动到项目的
    res/raw
    文件夹
    ( 如果您的项目在资源中没有直接的
    raw
    文件夹,那么只需制作一个并将gif放入其中即可)

  • 然后您只需用一行代码加载gif即可

  • 编辑:-

    Gif图像中的白色区域可能是因为使用了streatching Gif,这是我的设备中的外观

    或者,您可以查看此开源库以加载动画


    Gifimageview非常感谢。但实际上我只想使用glide。我不想导入另一个库。感谢glide从服务器加载图像,GifImageView像gif一样显示图像gif已经在res/drawable文件夹中,我只想在ImageView中显示它非常感谢。但实际上我只想使用glide。我不想导入另一个库。感谢您从服务器加载图像,并将gif图像视图改为像gif一样显示图像gif已经在res/drawable文件夹中,我只想在IMAGEVIEW中显示它谢谢,但它不起作用。gif是动画的,但gif中的第三个栏有一个白色区域,如下所示:非常感谢!我会试试你的建议!谢谢,但它不起作用。gif是动画的,但gif中的第三个栏有一个白色区域,如下所示:非常感谢!我会试试你的建议!