ImageView
suggest changeIntroduction
ImageView (android.widget.ImageView) is a View for displaying and manipulating image resources, such as Drawables and Bitmaps.
Some effects, discussed in this topic, can be applied to the image. The image source can be set in an XML file (layout folder) or programmatically in Java code.
Syntax
- The method
setImageResource(int resId)sets a drawable as the content of thisImageView. - Usage:
imageView.setImageResource(R.drawable.anyImage)
Parameters
| Parameter | Description |
|---|---|
resId |
Resource id of the image, such as R.drawable.anyImage |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents