Hi metal mikey,
I am using negative margins in my original layout XML (see the full
XML below, inside the LinearLayout android:id="@+id/p1cardscontainer"
section) and they are working fine (currently testing on 1.5)
However, the images only vanish when I do the animation and they slide
upwards. So I guess I need to do the negative inside the code AFTER
the animation ?
[XML]
<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/table"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_weight="8"
android:orientation="vertical" xmlns:android="http://
schemas.android.com/apk/res/android">
<LinearLayout android:id="@+id/heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="0">
<TextView android:id="@+id/headingText" android:text="@string/
Heading"
android:textColor="#ffffff"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:ellipsize="marquee"
android:singleLine="true"
android:scrollHorizontally="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"/>
</LinearLayout>
<RelativeLayout android:id="@+id/topRow"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="0">
<TextView android:id="@+id/o1TextBuffer"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/o1Name"
android:layout_width="wrap_content" android:layout_below="@id/
o1TextBuffer"
android:layout_height="wrap_content"
android:text="@string/Computer" />
<ImageView android:id="@+id/o1buffer"
android:layout_width="32px" android:layout_height="32px"
android:layout_below="@id/o1Name"/>
<ImageView android:id="@+id/o1c1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name" android:layout_toRightOf="@id/
o1buffer"/>
<ImageView android:id="@+id/o1c2"
android:layout_width="wrap_content" android:layout_toRightOf="@id/
o1c1" android:layout_marginLeft="-40px"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name"/>
<ImageView android:id="@+id/o1c3"
android:layout_width="wrap_content" android:layout_toRightOf="@id/
o1c2" android:layout_marginLeft="-40px"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name"/>
<ImageView android:id="@+id/o1c4"
android:layout_width="wrap_content" android:layout_toRightOf="@id/
o1c3" android:layout_marginLeft="-40px"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name"/>
<ImageView android:id="@+id/o1c5"
android:layout_width="wrap_content" android:layout_toRightOf="@id/
o1c4" android:layout_marginLeft="-40px"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name"/>
<ImageView android:id="@+id/o1c6"
android:layout_width="wrap_content" android:layout_toRightOf="@id/
o1c5" android:layout_marginLeft="-40px"
android:layout_height="wrap_content"
android:layout_below="@id/o1Name"/>
</RelativeLayout>
<TableRow android:id="@+id/middleRow"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_weight="3"
android:layout_gravity="center_horizontal">
<RelativeLayout android:id="@+id/center"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="2"
android:layout_width="wrap_content">
<ImageView android:id="@+id/blank"
android:layout_width="73px"
android:layout_height="97px"/>
<ImageView android:id="@+id/deck"
android:layout_toRightOf="@id/blank"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10px"
android:layout_marginRight="10px"/>
<ImageView android:id="@+id/stock"
android:layout_toRightOf="@id/deck"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
</TableRow>
<LinearLayout android:id="@+id/bottom"
android:orientation="vertical" android:layout_width="fill_parent"
android:gravity="center"
android:layout_gravity="bottom"
android:layout_height="wrap_content"
android:layout_weight="1">
<TableLayout android:id="@+id/p1CardsAndActionButtonContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TableRow>
<LinearLayout android:id="@+id/p1cardscontainer"
android:layout_width="wrap_content"
android:layout_gravity="left"
android:gravity="left"
android:layout_height="wrap_content">
<ImageView android:id="@+id/btnArrowLeft"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:src="@drawable/btn_arrowleft"/>
<ImageView android:id="@+id/p1c1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px" />
<ImageView android:id="@+id/p1c2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:layout_marginLeft="-40px"/>
<ImageView android:id="@+id/p1c3"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:layout_marginLeft="-40px"/>
<ImageView android:id="@+id/p1c4"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:layout_marginLeft="-40px"/>
<ImageView android:id="@+id/p1c5"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:layout_marginLeft="-40px"/>
<ImageView android:id="@+id/p1c6"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:layout_marginLeft="-40px"/>
<ImageView android:id="@+id/btnArrowRight"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0px"
android:src="@drawable/btn_arrowright"/
>
</LinearLayout>
</TableRow>
</TableLayout>
<TextView android:id="@+id/p1Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Player"
android:gravity="center_horizontal"
android:layout_gravity="left|center_vertical"/>
</LinearLayout>
</TableLayout>
[/XML]
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en