0
但圖像仍處於原始形狀。任何解決方案請看代碼滑動載入圖像到自定義視圖不起作用
CircularView circularimage1= (CircularView)findViewById(R.id.customView);
Glide.with(this.getApplicationContext()).load(R.drawable.picture1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(new ViewTarget<CircularImageView, GlideDrawable>(circularimage1) {
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation anim) {
CircularView myView = this.view;
// Set your resource on myView and/or start your animation here.
Log.e(TAG, "onResourceReady: "+myView.getBorderWidth());
myView.setImageDrawable(resource.getCurrent());
myView.setBorderWidth(2);
Log.e(TAG, "onResourceReady: "+myView.getBorderWidth());
myView.setBorderColor(R.color.yellow);
}
});