Asaf Nevo Asaf Nevo - 2 years ago 186
Android Question

android how to change <item> width and height

i'm making a layer-list for drawable...
i have my background image, and i want the second layer to be smaller,
but it seems that not matter what i'm writing inside my android:layer_width\height
the second layer size remain the same..

this is my xml:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android=""
android:layout_height="wrap_content" >

<item android:drawable="@drawable/picuser"

<item android:drawable="@drawable/ic_launcher"


amp amp
Answer Source

I hope this put you on the right direction:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="">

<item android:drawable="@drawable/picuser"/>

      <bitmap android:src="@drawable/ic_launcher"
        android:gravity="center" />


As you can see here <item> doesn't have width/height attributes...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download