@@ -395,8 +415,12 @@ public class ImageView extends View {
mMaxHeight=maxHeight;
}
/** Return the view's drawable, or null if no drawable has been
assigned.
/**
* Gets the current Drawable, or null if no Drawable has been
* assigned.
*
* @return the view's drawable, or null if no drawable has been
* assigned.
*/
publicDrawablegetDrawable(){
if(mDrawable==mRecycleableBitmapDrawable){
@@ -428,7 +452,6 @@ public class ImageView extends View {
/**
* Sets a drawable as the content of this ImageView.
*
* <p class="note">This does Bitmap reading and decoding on the UI
* thread, which can cause a latency hiccup. If that's a concern,
* consider using {@link #setImageDrawable(android.graphics.drawable.Drawable)} or
@@ -474,7 +497,10 @@ public class ImageView extends View {
/**
* Sets the content of this ImageView to the specified Uri.
*
* Note that you use this method to load images from a local Uri only.
* <p/>
* To learn how to display images from a remote Uri see: <a href="https://developer.android.com/topic/performance/graphics/index.html">Handling Bitmaps</a>
* <p/>
* <p class="note">This does Bitmap reading and decoding on the UI
* thread, which can cause a latency hiccup. If that's a concern,
* consider using {@link #setImageDrawable(Drawable)} or
@@ -598,6 +624,9 @@ public class ImageView extends View {
}
/**
* Get the current {@link android.content.res.ColorStateList} used to tint the image Drawable,
* or null if no tint is applied.
*
* @return the tint applied to the image drawable
* @attr ref android.R.styleable#ImageView_tint
* @see #setImageTintList(ColorStateList)
@@ -626,7 +655,8 @@ public class ImageView extends View {
}
/**
* @return the blending mode used to apply the tint to the image drawable
* Gets the blending mode used to apply the tint to the image Drawable
* @return the blending mode used to apply the tint to the image Drawable
@@ -673,6 +703,13 @@ public class ImageView extends View {
setImageDrawable(mRecycleableBitmapDrawable);
}
/**
* Set the state of the current {@link android.graphics.drawable.StateListDrawable}.
* For more information about State List Drawables, see: <a href="https://developer.android.com/guide/topics/resources/drawable-resource.html#StateList">the Drawable Resource Guide</a>.
*
* @param state the state to set for the StateListDrawable
* @param merge if true, merges the state values for the state you specify into the current state
*/
publicvoidsetImageState(int[]state,booleanmerge){
mState=state;
mMergeState=merge;
@@ -786,17 +823,16 @@ public class ImageView extends View {
}
/**
* Return the current scale type in use by this ImageView.
*
* Returns the current ScaleType that is used to scale the bounds of an image to the bounds of the ImageView.