@Test public void testOnPrepareChoices() { ImageView imageView = new ImageView(RuntimeEnvironment.application); ImageViewTarget target = new ImageViewTarget(imageView); target.placeHolder(new ColorDrawable(Color.BLUE)); target.onPreparingLoad(); Assert.assertNotNull(imageView.getDrawable()); target = new ImageViewTarget(imageView); target.placeHolder(R.drawable.abc_btn_radio_material); target.onPreparingLoad(); target = new ImageViewTarget(imageView); Assert.assertNull(target.getPlaceHolderDrawable()); target.onPreparingLoad(); Assert.assertNull(imageView.getDrawable()); }
@Override protected void onPreparingLoad(ImageView view) { if (getPlaceHolderResourceId() != 0) { view.setImageResource(getPlaceHolderResourceId()); } else if (getPlaceHolderDrawable() != null) { view.setImageDrawable(getPlaceHolderDrawable()); } else { view.setImageDrawable(null); } }
ImageViewTarget extends ViewTarget<ImageView> { @Override protected void onPreparingLoad(ImageView view) { if (getPlaceHolderResourceId() != 0) { view.setImageResource(getPlaceHolderResourceId()); } else if (getPlaceHolderDrawable() != null) { view.setImageDrawable(getPlaceHolderDrawable()); } else { view.setImageDrawable(null); } } }
ImageViewTarget extends ViewTarget<ImageView> { @Override protected void onPreparingLoad(ImageView view) { if (getPlaceHolderResourceId() != 0) { view.setImageResource(getPlaceHolderResourceId()); } else if (getPlaceHolderDrawable() != null) { view.setImageDrawable(getPlaceHolderDrawable()); } else { view.setImageDrawable(null); } } ImageViewTarget(ImageView imageView);  ImageViewTarget(MirageRequest request, ImageView imageView); }
ImageViewTarget extends ViewTarget<ImageView> { @Override protected void onPreparingLoad(ImageView view) { if (getPlaceHolderResourceId() != 0) { view.setImageResource(getPlaceHolderResourceId()); } else if (getPlaceHolderDrawable() != null) { view.setImageDrawable(getPlaceHolderDrawable()); } else { view.setImageDrawable(null); } } ImageViewTarget(ImageView imageView);  ImageViewTarget(MirageRequest request, ImageView imageView); @Override ViewTarget<ImageView> fade(); }
ImageViewTarget extends ViewTarget<ImageView> { @Override protected void onPreparingLoad(ImageView view) { if (getPlaceHolderResourceId() != 0) { view.setImageResource(getPlaceHolderResourceId()); } else if (getPlaceHolderDrawable() != null) { view.setImageDrawable(getPlaceHolderDrawable()); } else { view.setImageDrawable(null); } } ImageViewTarget(ImageView imageView);  ImageViewTarget(MirageRequest request, ImageView imageView); @Override ViewTarget<ImageView> fade();  }