アイコンを蜂の巣のように配置
最初からそういう画像を作る方が簡単ですが
動的に回転させたいのであれば
Matrixを使えば回転できます
ImageView imageView = findViewById(R.id.image_view);
Bitmap bitmap1 = BitmapFactory.decodeResource(getResources(),
R.drawable.img);
// アイコン程度であればこれでいいかも
int imageWidth = bitmap1.getWidth();
int imageHeight = bitmap1.getHeight();
Matrix matrix = new Matrix();
// 画像中心を基点に90度回転
matrix.setRotate(90, imageWidth/2, imageHeight/2);
Bitmap bitmap2 = Bitmap.createBitmap(bitmap1, 0, 0,
imageWidth, imageHeight, matrix, true);
imageView.setImageBitmap(bitmap2);
多くの画像でこれをやると重い処理になりそうではありますが
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/28 08:49
2018/01/28 13:33