Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove white border around an ImageView

My designer keeps adding a little padding around my image. I want the image the stick on the top and to fill out the width of the screen.

Here's a screenshot from the designer:

Screenshot

This is my XML code:

<ImageView
    android:id="@+id/markertap_header"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:src="@drawable/header_bootsverleih_xhdpi" />
like image 752
medphys Avatar asked Dec 04 '12 17:12

medphys


People also ask

How do I remove the outline of an image?

Remove a border around a picture, text box, or other objectRight-click on the picture or other object and choose Format <object type>. On the Colors and Lines tab, click Color and select No Outline.

Can ImageView display video?

ImageView is a control which display image on android and support RGB image, so setting the data of ImageView every period can generate dynamic video.

How can I bring ImageView in front?

Just one single method will let you to bring your view to the front and the magic words are : myView. bringToFront(); “.


1 Answers

It looks like the image is larger than the screen width, so it's getting scaled down after sizing. Try adding android:adjustViewBounds="true" to your ImageView.

like image 176
Kevin Coppock Avatar answered Oct 02 '22 08:10

Kevin Coppock