I use a bitmap to create a stack view and show it in the image view. Based on this, you can save the bitmap - this is a resource, and then add it to the gridview or use it in the gridview adapter in getView, I think.

Bitmap m1c = BitmapFactory.decodeResource(getResources(), R.drawable.cat_13); Bitmap m2c = BitmapFactory.decodeResource(getResources(), R.drawable.cat_13); int w = m1c.getWidth(); int h = m1c.getHeight(); Matrix mtx = new Matrix(); mtx.postRotate(4); Bitmap rotatedBMP = Bitmap.createBitmap(m1c, 0, 0, w, h, mtx, true); Matrix mtx2 = new Matrix(); mtx2.postRotate(-4); Bitmap rotatedBMP2 = Bitmap.createBitmap(m1c, 0, 0, w, h, mtx2, true); Canvas comboImage = new Canvas(rotatedBMP); comboImage.drawBitmap(rotatedBMP2, -10 , -10 , null); comboImage.drawBitmap(m2c, 10 , 10 , null); ImageView image = (ImageView) findViewById(R.id.imageView1); image.setImageBitmap(rotatedBMP);
Gina Jul 12 '13 at 7:56 2013-07-12 07:56
source share