samedi 16 mai 2015

ImageView and EditText becomes dead after animation

I have been trying to implement an animation on a relativeLayout. The animation works fine but after the animation is complete the edittext and the imageview inside the relative layout stops responding to any kind of user activity.

<LinearLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<RelativeLayout
    android:id="@+id/rl_maincontroller_mainLayout"
    android:layout_width="match_parent"
    android:layout_height="380dp"
    android:background="@color/button_color" >

    <ImageView
        android:id="@+id/iv_maincontroller_backImage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_centerVertical="true"
        android:src="@drawable/back" />

    <EditText
        android:id="@+id/tv_searchBox"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_toRightOf="@+id/iv_maincontroller_backImage"
        android:background="@android:color/white"
        android:drawableLeft="@drawable/search"
        android:drawablePadding="10dp"
        android:gravity="center_vertical"
        android:layout_centerVertical="true"
        android:hint="@string/search"
        android:paddingLeft="10dp"
        android:textColor="@android:color/black"
        android:textColorHint="@color/grey"
        android:textSize="17sp" />
</RelativeLayout>
</LinearLayout>

Before the animation the controls on the widgets work fine, the animation changes the parent relative layout from height 380 to 120 and after that the widgets become dead to any kind of user activity. I cannot control them. Can anyone please suggest an answer. Need it very urgently, have been stuck in it for hours.

Aucun commentaire:

Enregistrer un commentaire