Android button that fades into view
<p>I want to have a button that is originally invisible. I then want the button to fade into view </p>

<p>Here is my code </p>

<pre><code>    &lt;Button
    android:id="@+id/textFade"
    android:layout_width="fill_parent"
    android:layout_height="60dp"
    android:alpha="0"
    android:text="Sample Button" /&gt;
</code></pre>

<p>and then in the onCreate function of my activity i add </p>

<pre><code>    Animation fadeIn = new AlphaAnimation(0, 1);
    fadeIn.setInterpolator(new AccelerateInterpolator()); //add this
    fadeIn.setDuration(1000);

    Button b=(Button)findViewById(R.id.textFade);


    AnimationSet animation = new AnimationSet(false); //change to false
    animation.addAnimation(fadeIn);
    b.setAnimation(animation);
</code></pre>

<p>But this does not work. Any ideas how i can achieve this ? </p>

<p>Kind Regards</p>
