现在的位置: 首页 > 综合 > 正文

随笔

2018年01月18日 ⁄ 综合 ⁄ 共 751字 ⁄ 字号 评论关闭

             BitmapFactory.Options options = new BitmapFactory.Options();
      options.inSampleSize = 3;
      bitmap = BitmapFactory.decodeFile(rootPath + getImagePathByClassID(classId))
      .copy(Bitmap.Config.ARGB_8888, true);;
            Log.d("debug -->> ", "流不为空...");
       
               String classLocation = getClassesLocation(classId);
              x = getX(classLocation);
              y = getY(classLocation);
             
               
              Canvas canvas = new Canvas(bitmap); 
              Bitmap bp_item = BitmapFactory.decodeStream(getResources().openRawResource(R.drawable.mine_attention_detail_pin));
              canvas.drawBitmap(bp_item, x, y, null);
             

              view.setImageBitmap(bitmap);

    @Override
    public void finish() {
    if(bitmap != null){
    if(!bitmap.isRecycled()){
    bitmap.recycle();
    System.gc();
    }
    }
    super.finish();
    }

抱歉!评论已关闭.