I need to include a header graphic in all of my activities/views. The file with the header is called header.xml:
It has to do with the image aspect ratio. By default, the system keeps the original aspect ratio of the image source. Which in most cases does not exactly match the layout or dimensions specified in the layout. Therefore,
android:scaleType to fit the image. For example, you can specify android:scaleType="fitXY"