public class ImagePiece {
public int index = 0;
public Bitmap bitmap = null;
}
public void init()
{
// Bitmap bitmap = BitmapFactory.decodeResource(this.getContext().getResources(), R.drawable.test);
Bitmap bmp=BitmapFactory.decodeResource(this.getResources(),R.drawable.koala);
List<ImagePiece> pieces = ImageSplitter.split(bmp, 5, 7);
ImageButton im;
im=(ImageButton)findViewById(R.id.ImageButton11);
im.setImageBitmap(pieces[0].bitmap);//这里语法错了,该怎么写呢?
}
bmp java bitmap List
------解决方案--------------------
im.setImageBitmap(pieces.get(0).bitmap);
------解决方案--------------------
im.setImageBitmap(pieces.get(0).bitmap);