在给界面,而不是一个组件中添加动态图时,如果直接在xml中添加,会显示静态的图片,但是,用代码,好像又不行。
报红线 Cannot resolve method 'into(android.widget.RelativeLayout)'
下面是设置图片的代码
RelativeLayout tuxing_page = view.findViewById(R.id.tuxing_page);
RequestOptions options1 = new RequestOptions().error(R.drawable.gif_falling_stars);
Glide.with(this).load(R.drawable.gif_falling_stars).apply(options1).into(tuxing_page);