Problem in adding animation Effect
<p>I have created an app..now i want to add animation effect in my app..the code i have used is work fine..but the problem is that, in my mainlayout where array of buttons is present doesnt respond to animation effect..Actually in onTouchListener of main layout i called the fuction which cause the animation..and it work except for the part which is occupied by array of buttons..how can i resolved this problem..can anyone help me..i  am sending my code..</p>

<pre><code>XML File:
</code></pre>

<p></p>

<pre><code>&lt;ViewFlipper android:id="@+id/flipview" android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_marginTop="15dp"&gt;  
    &lt;LinearLayout android:id="@+id/liVLayout" android:orientation="vertical" android:layout_width="fill_parent"             
        android:layout_height="wrap_content"&gt;                                                                 
    &lt;/LinearLayout&gt;    
&lt;/ViewFlipper&gt;
</code></pre>

<p></p>

<pre><code>JAVA Code:

public void onCreate(Bundle savedInstanceState)
{   
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.calendar_frm); 
    LinearLayout layMain = (LinearLayout) findViewById(R.id.layout_main);
    layMain.setOnTouchListener((OnTouchListener) this);
    initDay();  
</code></pre>

<p>}</p>

<pre><code>  public boolean initDay()
  {
    LinearLayout layoutVertical = (LinearLayout) findViewById(R.id.liVLayout);
    LinearLayout rowLayout = null;

    LayoutParams param = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1);

    //Create Button
    for (int i = 0; i&lt;6; i++)
    {
        rowLayout = new LinearLayout(this);
        rowLayout.setWeightSum(7);
        layoutVertical.addView(rowLayout, param);   

        for(int j=0; j&lt;7; j++)
        {
            m_pBtnDay[i][j] = new Button(this);             
            m_pBtnDay[i][j].setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
            rowLayout.addView(m_pBtnDay[i][j], param); 

            m_pBtnDay[i][j].setOnLongClickListener(this);                           
            m_pBtnDay[i][j].setOnClickListener(this);

            //save button position
            m_pBtnDay[i][j].setTag(new CalendarForm(i , j));
        }
    }

    return true;
}

public boolean onTouch(View arg0, MotionEvent arg1) 
{
    // Get the action that was done on this touch event
    switch (arg1.getAction())
    {
        case MotionEvent.ACTION_DOWN:
        {
            //store the X value when the user's finger was pressed down
            m_downXValue = arg1.getX();
            break;
        }                   
        case MotionEvent.ACTION_UP:
        {
            // Get the X value when the user released his/her finger
            float currentX = arg1.getX();            

            // going backwards: pushing stuff to the right
            if (m_downXValue &lt; currentX)
            {
                // Get a reference to the ViewFlipper
                ViewFlipper vf = (ViewFlipper) findViewById(R.id.flipview);

                // Set the animation
                vf.setAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_right));

            }   

            // going forwards: pushing stuff to the left
            if (m_downXValue &gt; currentX)
            {
                // Get a reference to the ViewFlipper
                ViewFlipper vf = (ViewFlipper) findViewById(R.id.flipview);
                // Set the animation
                vf.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_left));

            }

            break;
        }
    }

    // if you return false, these actions will not be recorded
    return true;
 }
</code></pre>
