Can you have a textSwitcher and imageSwitcher in the same class?
<p>I have a class that extends Activity and implements ViewFactory.</p>

<p>I have found some tutorials and code examples that show how to setup a <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/TextSwitcher1.html" rel="nofollow">textSwitcher</a> and <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ImageSwitcher1.html" rel="nofollow">imageSwitcher</a>.</p>

<p>With both examples you have to create:</p>

<pre><code>public View makeView() {

return x;
}  
</code></pre>

<p>Where x is either the textView or ImageView.</p>

<p>Here is an example of what I tried to use:</p>

<pre><code>@Override
public View makeView() {
    ImageView iView = new ImageView(this);
    iView.setScaleType(ImageView.ScaleType.FIT_CENTER);
    iView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
    iView.setBackgroundColor(0xFFFFFFFF);

    TextView t = new TextView(this);
    t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
    t.setTextSize(36);

    return iView;
}
</code></pre>

<p>I can only return one of the views so I get a forced close when I try to run it with a textSwitcher called.</p>

<p>Any ideas? Is there a better way to do this?</p>

<p>Thank you,</p>

<p>Neil</p>
