flipper stop working
<p>i am new in Android working on flipper and i wana add image at the top and want to have no effect on it of flipper and the rest of the body work on flipper  and i am facing this problem that application had stop working the code and xml is listed below</p>

<p><strong>.xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" &gt;

    &lt;ImageView
        android:id="@+id/imageView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_launcher" /&gt;

    &lt;ViewFlipper
        android:id="@+id/view_flipper"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_margin="6dip" &gt;

        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="center" &gt;

            &lt;TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="this is text 1"
                android:textColor="#00ff00"
                android:textSize="14sp"
                android:textStyle="bold" &gt;
            &lt;/TextView&gt;
        &lt;/LinearLayout&gt;

        &lt;LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="center" &gt;

            &lt;TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="this is text 2"
                android:textColor="#00ff00"
                android:textSize="14sp"
                android:textStyle="bold" &gt;
            &lt;/TextView&gt;
        &lt;/LinearLayout&gt;
    &lt;/ViewFlipper&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p><strong>.java</strong></p>

<pre><code>package com.test.flipper_example;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MotionEvent;
import android.widget.ViewFlipper;

public class Offlipper_example3 extends Activity{
    private ViewFlipper vf;
    private float lastX;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.flipper03);
        vf = (ViewFlipper) findViewById(R.id.view_flipper);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    @Override
    public boolean onTouchEvent(MotionEvent te) {
        switch (te.getAction())
        {
        case MotionEvent.ACTION_DOWN:
        {
        lastX = te.getX();
        break;
        }
        case MotionEvent.ACTION_UP:
        {
        float currentX = te.getX();
        if (lastX &lt; currentX)
        {
        if (vf.getDisplayedChild()==0) break;
        vf.setInAnimation(this, R.anim.slide_left);
        vf.setOutAnimation(this, R.anim.slide_right);
        vf.showNext();
        }
        if (lastX &gt; currentX)
        {
        if (vf.getDisplayedChild()==1) break;
        vf.setInAnimation(this, R.anim.slide_right);
        vf.setOutAnimation(this, R.anim.slide_left);
        vf.showPrevious();
        }
        break;
        }
        }

        return false;


    }
}
</code></pre>
