Help using ImageSwitcher in android
<p>So In my program I used to use Imageviews in my layout to display images and had it so when a user pressed the Imageview it changes images. But i recently upgraded my project to version 8 and updated by SDK and i see now that there is a ImageSwitcher view under Transitions. I would like to replace my ImageViews with ImageSwitchers. Ive googled and searched all over but i cant seem to figure out how it works. I was wondering if anyone would be able to explain or show me an example of code on how to use it. What i want is very basic. I just want it to display an image from a bitmap and then when the user swipes left or right it changes the bitmap. I already have the bitmaps. I just cant figure out the code.</p>

<p>I tried using this code to start out but i couldnt get it to work with the bitmap</p>

<pre><code>ImageSwitcher is = (ImageSwitcher) findViewById(R.id.imageSwitcher1);
is.setImageResource(bmap);
</code></pre>

<p>I tried using this new code to turn my bitmap into a drawable but it always crashes when run. Is there something i can fix?</p>

<pre><code>Drawable d = new BitmapDrawable(bmap);
ImageSwitcher is = (ImageSwitcher) findViewById(R.id.imageSwitcher1);
is.setImageDrawable(d);
</code></pre>
