I need to include a header graphic in all of my activities/views. The file with the header is called header.xml:
May be you can give specific height to imageView say 50dp or 40dp
and adjust image to make green border
dissappear.
Eg: android:layout_height="40dp"
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"