2016-07-23 7 views

Antwort

0

Wenn Sie fit() verwenden, muss Ihr Ziel ein ImageView sein.

Vom javadoc: http://square.github.io/picasso/2.x/picasso/com/squareup/picasso/RequestCreator.html#fit--

public RequestCreator fit() 

Attempt to resize the image to fit exactly into the target ImageView's bounds. 
This will result in delayed execution of the request until the ImageView has been 
laid out. 

Note: This method works only when your target is an ImageView. 
+0

Mein Ziel ist ein Imageview? in onBitmapLoaded, das die Bildansicht einstellt. Aber ich kann noch nicht Fit verwenden. Wie kann ich fit verwenden? – Shahryar

+0

@Shahryar die einzige Möglichkeit, 'fit()' zu verwenden, ist das Laden von image 'in (imageView)', nicht 'in (Target)'. –

Verwandte Themen