RoseBoxSeekBarView.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:Gizwits-AirPurifier_Android 作者:
/**
 * @param context
 * @param attrs
 * @param defStyle
 */
public RoseBoxSeekBarView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    this.mContext = context;
    mResources = context.getApplicationContext().getResources();
    drawFilter = new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG
            | Paint.FILTER_BITMAP_FLAG);
    int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
    int cacheSize = maxMemory / 8;
    mMemoryCache = new LruCache<String, Bitmap>(cacheSize) {
        @Override
        protected int sizeOf(String key, Bitmap bitmap) {
            // 重写此方法来衡量每张图片的大小,默认返回图片数量。
            return bitmap.getByteCount() / 1024;
        }
    };
    // typeface = Typeface.createFromAsset(getContext().getAssets(),
    // "fonts/HELVETICANEUELTSTD-THEX.OTF");

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号