Show GIF using Glide in AlertDialog
I want to show GIF using Glide in ImageView, and set this ImageView in AlertDialog. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button_main = (Button)findViewById(R.id.button_main); imageView_main = (ImageView)findViewById(R.id.imageView_main); GlideDrawableImageViewTarget imageViewMainTarget = new GlideDrawableImageViewTarget(imageView_main); Glide.with(MainActivity.this).load(R.raw.test).into(imageViewMainTarget); button_main.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ImageView gifImageView = new ImageView(MainActivity.this); GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(gifImageView); Glide.with(MainActivity.this).load(R.raw.test).into(imageViewTarget); AlertDialog.Builder share_dialog = new AlertDialog.Builder(MainActivity.this); share_dialog.setMessage("GIF Test"); share_dialog.setPositiveButton("Done", null); share_dialog.setView(gifImageView); share_dialog.show(); } }); } GIF can only display in imageView_main, it can't be shown on AlertDialog's gifImageView ! Why ? https://stackoverflow.com/questions/46366287/show-gif-using-glide-in-alertdialog