三張圖片壓縮顯示成一張圖片

static private Drawable GetNewDrawableEditDel(Drawable fontDrawable,
   Drawable bgDrawable, Drawable bgDelDrawable) {get

  Drawable[] array = new Drawable[3];
  array[2] = bgDrawable;
  array[0] = bgDelDrawable;
  array[1] = fontDrawable;it

  array[1].setAlpha(40);
  LayerDrawable ld = new LayerDrawable(array);
  // 令前景居中
  int l = (array[1].getIntrinsicWidth() - array[0].getIntrinsicWidth()) / 2;
  int t = (array[1].getIntrinsicHeight() - array[0].getIntrinsicHeight()) / 2;static

  // int l = array[1].getIntrinsicWidth() * 20/100;
  // int t = l;di

  ld.setLayerInset(0, l, t, l, t);
  ld.setAlpha(255);
  return ld;new

相關文章
相關標籤/搜索