私はアクティビティでこれを行いましたが、完全に機能します。
ImageView myImage = (ImageView) findViewById(R.id.myImageView);
ShapeDrawable mDrawable;
mDrawable = new ShapeDrawable(new OvalShape());
mDrawable.getPaint().setColor(0xff74AC23);
mDrawable.setBounds(x, y, x + width, y + height);
mDrawable.setIntrinsicWidth(width);
mDrawable.setIntrinsicHeight(height);
myImage.setImageDrawable(mDrawable);
今、私は同じことをウィジェット (内部onUpdate
) で行いたいと思っておりRemoteViews
、画像にアクセスするために使用する必要があります。
fromsetImageDrawable
のを呼び出すにはどうすればよいですか? すべてのリモート ビュー メソッドは、.ImageView
RemoteViews
Bitmap