Sunday, 21 September 2014

layer-list items dont appear with it's original sizes



I want to make several images layers .. i made a layer-list and used it as android:src of an ImageView .. the problem is all the layers fill the image view , is there any way to make every image in every layer appear with it's original size ?!


that's my layer-list code



<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://ift.tt/nIICcg" >
<item
android:drawable="@drawable/dark"
/>
<item
android:drawable="@drawable/bg1"
/>
<item
android:drawable="@drawable/graphic_ring"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</layer-list>


and thats my main layout



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="551dp"
android:layout_height="265dp"
android:layout_weight="0.70"
android:src="@layout/test_layers" />

</LinearLayout>

No comments:

Post a Comment