Imageview Not Displaying Correctly In The Device
I have this layout that I want to use as a header for navigation bar: When in doubt, use
Use
Solution 1:
The answer is simple:
When in doubt, use android.support.v7.widget.AppCompatImageView
I thought that Android docs advising against its use in general was something to be taken seriously.
This will automatically be used when you use
ImageView
in your layouts. You should only need to manually use this class when writing custom views.
Another place I read that you are supposed to be extending from AppCompatActivity
to enable this behavior. My Activities DO extend from AppCompatActivity
but still I spent so much time thinking that maybe something is buggy with ConstraintLayout
after all.
NO. My belovedConstraintLayout
hasn't lost its chivalry yet. :)
So, when in doubt, I reiterate,
Use android.support.v7.widget.AppCompatImageView
Some other answers saying the same thing:
Post a Comment for "Imageview Not Displaying Correctly In The Device"