當前位置: 首頁>>代碼示例>>Java>>正文


Java Drawable.setDither方法代碼示例

本文整理匯總了Java中android.graphics.drawable.Drawable.setDither方法的典型用法代碼示例。如果您正苦於以下問題:Java Drawable.setDither方法的具體用法?Java Drawable.setDither怎麽用?Java Drawable.setDither使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.graphics.drawable.Drawable的用法示例。


在下文中一共展示了Drawable.setDither方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: applyTo

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
@SuppressLint("Range")
public void applyTo(Drawable drawable) {
  if (drawable == null) {
    return;
  }
  if (mAlpha != UNSET) {
    drawable.setAlpha(mAlpha);
  }
  if (mIsSetColorFilter) {
    drawable.setColorFilter(mColorFilter);
  }
  if (mDither != UNSET) {
    drawable.setDither(mDither != 0);
  }
  if (mFilterBitmap != UNSET) {
    drawable.setFilterBitmap(mFilterBitmap != 0);
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:DrawableProperties.java

示例2: setImageBitmap

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
private void setImageBitmap(Bitmap bitmap, int rotation) {

        super.setImageBitmap(bitmap);
        Drawable d = getDrawable();
        if (d != null) {
            d.setDither(true);
        }

        Bitmap old = mBitmapDisplayed.getBitmap();
        mBitmapDisplayed.setBitmap(bitmap);
        mBitmapDisplayed.setRotation(rotation);

        if (old != null && old != bitmap && mRecycler != null) {
            mRecycler.recycle(old);
        }
    }
 
開發者ID:SalmanTKhan,項目名稱:MyAnimeViewer,代碼行數:17,代碼來源:ImageViewTouchBase.java

示例3: createImageTileView

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
public static View createImageTileView(LayoutInflater layoutInflater,
        View convertView, ViewGroup parent, Drawable thumb) {
    View view;

    if (convertView == null) {
        view = layoutInflater.inflate(R.layout.wallpaper_picker_item, parent, false);
    } else {
        view = convertView;
    }

    ImageView image = (ImageView) view.findViewById(R.id.wallpaper_image);

    if (thumb != null) {
        image.setImageDrawable(thumb);
        thumb.setDither(true);
    }

    return view;
}
 
開發者ID:TeamBrainStorm,項目名稱:SimpleUILauncher,代碼行數:20,代碼來源:WallpaperPickerActivity.java

示例4: setDither

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
@Override
public void setDither(boolean dither) {
  mDrawableProperties.setDither(dither);
  for (int i = 0; i < mLayers.length; i++) {
    Drawable drawable = mLayers[i];
    if (drawable != null) {
      drawable.setDither(dither);
    }
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:ArrayDrawable.java

示例5: setImageBitmap

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
private void setImageBitmap(Bitmap bitmap, int rotation) {
    super.setImageBitmap(bitmap);
    Drawable d = getDrawable();
    if (d != null) {
        d.setDither(true);
    }

    Bitmap old = bitmapDisplayed.getBitmap();
    bitmapDisplayed.setBitmap(bitmap);
    bitmapDisplayed.setRotation(rotation);

    if (old != null && old != bitmap && recycler != null) {
        recycler.recycle(old);
    }
}
 
開發者ID:mityung,項目名稱:XERUNG,代碼行數:16,代碼來源:ImageViewTouchBase.java

示例6: setThumb

import android.graphics.drawable.Drawable; //導入方法依賴的package包/類
public void setThumb(Drawable thumb) {
    if (mView != null && thumb != null) {
        thumb.setDither(true);
        ImageView image = (ImageView) mView.findViewById(R.id.wallpaper_image);
        image.setImageDrawable(thumb);
    }
}
 
開發者ID:michelelacorte,項目名稱:FlickLauncher,代碼行數:8,代碼來源:DrawableThumbWallpaperInfo.java


注:本文中的android.graphics.drawable.Drawable.setDither方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。