コード例 #1
0
 private void setPicture() {
   String pictureKey = task.getString(TaskAdapter.PICTURE);
   if (pictureKey != null) {
     service.asyncLoadFile(
         pictureKey,
         new FileLoadCallback(pictureKey) {
           @Override
           public void onCompletion(CMFile file) {
             byte[] pictureBytes = file.fileContents();
             Bitmap asBitmap = BitmapFactory.decodeByteArray(pictureBytes, 0, pictureBytes.length);
             setImage(asBitmap);
           }
         });
   }
 }