Glide Android - Doesn't show all the image -


i have take picture in app. after take , have show in imageview, decided use glide library handle it.

i have set code this:

glide.with(this)                 .load(mlastphoto)                 .fitcenter()                 .centercrop()                 .into(iv_circ_image); 

and xml file looks like:

<imageview                 android:id="@+id/circ_image"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/btakepicture"                 android:layout_marginleft="20dp"                 android:layout_marginright="20dp"                 android:layout_margintop="12dp"                 android:src="@drawable/ab_background_textured_" /> 

but when phot has been taken, image shown this:

enter image description here

how have set glide code or xml show image?

add android:adjustviewbounds="true" attribute imageview. set true if want imageview adjust bounds preserve aspect ratio of drawable (from api-documentation http://developer.android.com/reference/android/widget/imageview.html).

<imageview     android:adjustviewbounds="true"     android:id="@+id/circ_image"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_below="@+id/btakepicture"     android:layout_marginleft="20dp"     android:layout_marginright="20dp"     android:layout_margintop="12dp"     android:src="@drawable/ab_background_textured_" /> 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -