-1

I am developing an app in which ,i'm in need to put a banner like in NDTV and techcrunch at the bottom of the app screen ,

Problem :

I have tried with the size 320 x 38 px which appears perfect. When I use a height greater than 38 it's pixelated and here is my code:

<ImageView
    android:id="@+id/listBanner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:adjustViewBounds="true"
    android:cropToPadding="false"
    android:scaleType="fitXY"
    android:src="@drawable/mobi" />

Could you please help me.

Thank you in advance!

Gerwin
  • 1,572
  • 5
  • 23
  • 51
madhavan
  • 115
  • 1
  • 8
  • 1
    Your scale type, resizes the image accordingly to the ImageView dimensions. If the w/h ration is not the same, the image will look pixelated. – Lukas Dec 11 '14 at 14:44
  • @Lukas thanks for your reply,when i change both W /H of wrap_content for the scaleTYPE fitXY, the image is not pixelated but width i need to give fill_parent to occupy the screen width – madhavan Dec 11 '14 at 15:29
  • I don't understand what exactly you want to archive. Can you post a screenshot? – Lukas Dec 11 '14 at 15:47
  • Hi @Lukas i don't have the permission to upload any image or screenshots and thing which i want is similar ad banner in NDTV – madhavan Dec 11 '14 at 17:08

1 Answers1

0

You shouldn't use "fill_content" for your layout_width if you don't wan't to have a pixeliated image. If you do so and your image is not big enough, it will fill all the bottom width and pixelate it if it's not big enough.

Antoine
  • 583
  • 2
  • 6
  • 21