嗨,大家好,我只是想让程序显示main0的布局,并保留几秒钟,然后显示布局main1,就像我们在任何手机上看到的程序一样,在程序开始时显示图像或布局,然后淡入淡出。我怎样才能让android程序显示一个布局,然后几秒钟。并显示另一个布局?
/**the main activity */
public class rdwt extends Activity implements OnClickListener{
Button b1;
Button b2;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main0);
//Here
setContentView(R.layout.main1);
b1= (Button)findViewById(R.id.Button01);
b2= (Button)findViewById(R.id.Button02);
b1.setOnClickListener(this);
b2.setOnClickListener(this);
}
public void onClick(View v) {
if (v==this.b1){
Intent callwrite = new Intent(this, wto.class);
startActivity(callwrite);
}
if(v==this.b2){
Intent callread = new Intent(this, rfr.class);
startActivity(callread);
}
}
}
感谢名单jleedev我真的再次 – SultanSh 2010-07-23 20:04:37