title: Eclipse Android: Different pages in one activity?
body: <p>I wanted to have 80 pages in my app, that look like the following code. I can go from one page to the next over two buttons. Because I don't want to create 80 activities, I have to connect the 80 pages in one activity. How does that work?</p>
  
  <pre><code> package com.example.xxx;
  
      import android.app.Activity;
      import android.content.Intent;
      import android.os.Bundle;
      import android.view.View;
  
  public class PictureOne extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.pictureone);}
  
  public void Picture0 (View view){
      Intent i = new Intent(this, PageZero.class);             
          startActivity(i);}}
  
  public void Picture2 (View view){
      Intent i = new Intent(this, PageTwo.class);             
          startActivity(i);}}
  </code></pre>
  
  <p>XML:</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="200dp"
          android:layout_height="200dp"
          android:layout_centerInParent="true"
          android:layout_marginLeft="14dp"
          android:src="@drawable/pic1" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView4"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:src="@drawable/left" 
          android:onClick="Picture0"/&gt;
  
      &lt;ImageView
          android:id="@+id/imageView4"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:src="@drawable/right" 
          android:onClick="Picture2"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>