簡體   English   中英

如何在 imageView 或畢加索中獲得 bitmap

[英]How to get bitmap in imageView OR picasso

為什么null返回?

Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap();

另外,當我使用畢加索時,它沒有轉到onBitmapLoaded方法

 Picasso.get().load("url").into(new Target() {
        @Override
        public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
         //Does not go to this method  
        }

        @Override
        public void onBitmapFailed(Exception e, Drawable errorDrawable) {

        }

        @Override
        public void onPrepareLoad(Drawable placeHolderDrawable) {
              //Coming this method
        }
    });

有什么問題? 為什么我無法從 imageView 獲得 bitmap? 你有解決方案嗎?

我用imageView的后台必須用src並解決

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM