public class MainActivity extends Activity {
ImageView image;
Button start;
Button cancel;
@Override
public void onCreate(Bundle savedInstanceState) {
(savedInstanceState);
setContentView(.activity_main);
image = (ImageView) findViewById(.main_img);
start = (Button) findViewById(.main_start);
cancel = (Button) findViewById(.main_cancel);
/** Set transparency gradient animation */
final AlphaAnimation animation = new AlphaAnimation(1, 0);
(2000);//Set the animation duration
/** Common methods */
//(int repeatCount);//Set the number of repetitions
//(boolean);//Are the animation still in the state of execution after the execution?
//(long startOffset);// Waiting time before execution
(new OnClickListener() {
public void onClick(View arg0) {
(animation);
/** Start animation */
();
}
});
(new OnClickListener() {
public void onClick(View v) {
/** End animation */
();
}
});
}
}<SPAN style="COLOR: #333333; FONT-FAMILY: Microsoft YaHei"><SPAN style="FONT-SIZE: 14px; LINE-HEIGHT: 26px">
</SPAN></SPAN>