What is the difference between src and background of ImageView

前端 未结 4 1733
[愿得一人]
[愿得一人] 2020-11-28 06:03

I am a puzzled about using src or background for an ImageView.

I know the former means the content of this ImageView

4条回答
  •  猫巷女王i
    2020-11-28 06:13

    All views can take a background image.

    The src to an ImageView has additional features:

    • different scaling types
    • adjustViewBounds for setting bounds to match image dimensions
    • some transformations such as alpha-setting

    And more that you may find in the docs.

提交回复
热议问题