Wednesday, February 26, 2014

Ask a simple syntax List


 
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 pieces = ImageSplitter.split (bmp, 5, 7);
ImageButton im;
im = (ImageButton) findViewById (R.id.ImageButton11);
im.setImageBitmap (pieces [0]. bitmap) ;/ / Here grammar wrong, how to write it?
}
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The first image is displayed on the wants pieces ImageButton
Reply:
cited a floor wangfan027 reply:
they want to display the first picture pieces
 im.setImageBitmap (. pieces.get (0) bitmap); 

Reply:
reference to the second floor tantahe reply:
Quote: references to a floor wangfan027 reply:

The first picture pieces they want to display on the ImageButton
 im.setImageBitmap (pieces.get (0) bitmap.); 
< / blockquote>

3q
Reply:
im.setImageBitmap (pieces.get (0) bitmap.);

No comments:

Post a Comment