I have an imageview that's included inside a RelativeLayout. When the imageview is clicked, I animate the entire RelativeLayout with a translate animation to move it down.
when I click the imageview again (in it's new location) it's supposed to move it back up, but it does not. However, if I click where the imageview started, it does move the entire "panel" back up. Why is the imageview not moving with the relativelayout...at least insofar as the clickability of it. The actual image is moving, but the spot where it's clickable is not.
here is my xml for the layout:
<RelativeLayout
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_width="fill_parent"
android:layout_height="120px"
android:layout_marginTop="-106px"
android:id="@+id/chatbox"
android:visibility="invisible">
<TextView
android:layout_width="fill_parent"
android:layout_height="106px"
android:background="#000000"
android:id="@+id/chattext" />
<ImageView
android:layout_width="20px"
android:layout_height="14px"
android:id="@+id/chatbubble"
android:layout_below="@id/chattext"
android:src="@drawable/chatbubble" />
</RelativeLayout>
Edit: I should add that I'm using Animation.setFillAfter(true) to hold the panel in place after the animation completes.