我是靠谱客的博主 朴素冬天,最近开发中收集的这篇文章主要介绍android显示动态图片不显示,andorid 加载gif图片不显示,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

glide 4.7.1 加载gif

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

android:orientation="horizontal"

android:gravity="center"

android:layout_gravity="center"

android:background="#f9f9f9"

android:layout_width="match_parent"

android:layout_height="50dp">

android:backgroundTint="#fe461c"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:gravity="center"

android:layout_gravity="center">

android:id="@+id/pulling"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_gravity="center"

android:gravity="center"

/>

android:id="@+id/pullok"

android:gravity="center"

android:layout_gravity="center"

android:layout_width="30dp"

android:layout_height="30dp"

/>

android:id="@+id/pullrelease"

android:gravity="center"

android:layout_gravity="center"

android:layout_width="30dp"

android:layout_height="30dp"

/>

private void initView(ReactContext context) {

this.reactContext = context;

header = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.header,null);

pulling = header.findViewById(R.id.pulling);

pullok = header.findViewById(R.id.pullok);

pullrelease = header.findViewById(R.id.pullrelease);

Glide.with(context).asGif().load(R.mipmap.pullrelease).into(pulling); //不能显示

Glide.with(context).asGif().load(R.mipmap.pullrelease).into(pullrelease); //不能显示

pullok.setImageResource(R.mipmap.pullok); //能显示

LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

params.gravity= Gravity.CENTER;

this.addView(header,params);

}

最后

以上就是朴素冬天为你收集整理的android显示动态图片不显示,andorid 加载gif图片不显示的全部内容,希望文章能够帮你解决android显示动态图片不显示,andorid 加载gif图片不显示所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(38)

评论列表共有 0 条评论

立即
投稿
返回
顶部