title: Change textview dynamically in Viewflipper
body: <p>pretty easy question here, but I am not a java superuser quite yet.</p>
  
  <p>I am using a ViewFlipper to provide a number of images, and a sliding-drawer to contain text specific to each image. I would like to have the text of the sliding drawer change to a specific string dependent on which child view is currently displayed.
  Here is the XML:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"
      android:orientation="vertical"&gt;
      &lt;LinearLayout
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"&gt;
          &lt;Button 
              android:id="@+id/previous" 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" 
              android:text="Prev" /&gt;
          &lt;Button 
              android:id="@+id/next" 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" 
              android:text="Next" /&gt;
      &lt;/LinearLayout&gt;
      &lt;ViewFlipper
          android:id="@+id/flipper" 
          android:layout_width="fill_parent" 
          android:layout_height="fill_parent"&gt;
          &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/image1"&gt;&lt;/ImageView&gt;
          &lt;ImageView android:id="@+id/imageView2" android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/image2"&gt;&lt;/ImageView&gt;
              &lt;/ViewFlipper&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>here is the java:</p>
  
  <pre><code> public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
  
  
              flipper = (ViewFlipper)findViewById(R.id.flipper);
              next = (Button) findViewById(R.id.next);
              previous = (Button) findViewById(R.id.previous);
              imageview1 = (ImageView)findViewById(R.id.imageView1);
              imageview2 = (ImageView)findViewById(R.id.imageView2);
  
  
  
              next.setOnClickListener(this);
              previous.setOnClickListener(this);
          }
  
  
  
          @Override
          public void onClick(View v) {
              if (v == next) {
                  flipper.setInAnimation(inFromRightAnimation());
                  flipper.setOutAnimation(outToLeftAnimation());
                  flipper.showNext();
              }
  
              if (v == previous) {
                  flipper.setInAnimation(inFromLeftAnimation());
                  flipper.setOutAnimation(outToRightAnimation());
                  flipper.showPrevious();
  
              }
              }
  </code></pre>
  
  <p>I'm sure the answer is really obvious, but that's why I need your help....THANKS!</p>