title: I'm having trouble creating an automatic slideshow in droid
body: <p>When I open droid I don't want any buttons I just want a sequence of images to automatically show, each for a few seconds before it's replaced with another image and once all the images are shown have it loop back to the first image. I am still new to droid development and I am obviously missing something. any help will be greatly appreciated.</p>
  
  <p>my java file</p>
  
  <pre><code>public class Slidingpics2Activity extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      ImageView image = (ImageView) findViewById(R.id.treat);
      image.setBackgroundResource(R.drawable.theanime);
  
      AnimationDrawable Anime = (AnimationDrawable) image.getBackground();
      Anime.start();
  
  }
  
  }
  </code></pre>
  
  <p>I put theanime.xml file in the drawable folder</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android" 
  android:oneshot="false"&gt;
  
      &lt;item android:drawable="@drawable/image1" android:duration="1000" /&gt;
      &lt;item android:drawable="@drawable/image2" android:duration="1000" /&gt;
      &lt;item android:drawable="@drawable/image3" android:duration="1000" /&gt;
      &lt;item android:drawable="@drawable/image4" android:duration="1000" /&gt;
  &lt;/animation-list&gt;
  </code></pre>
  
  <p>after that I mad my layout main.xml looks like this</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="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;ImageView
          android:id="@+id/treat" 
          android:layout_height="match_parent"
          android:layout_width="match_parent"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>