This is the first time I have come to learn android, now imitate handle network welcomeactivity
activity_welcome.xml
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="indicator_right_padding">10dp</dimen>
<dimen name="indicator_corner_radius">12dp</dimen>
<dimen name="indicator_internal_padding">4dp</dimen>
<dimen name="header_footer_left_right_padding">24dp</dimen>
<dimen name="header_footer_top_bottom_padding">12dp</dimen>
</resources>
welcomeactivity.java
com.lzh.lashou Package;
Import android.app.Activity;
Import android.content.Intent;
Import android.os.Bundle;
Import android.os.Handler;
Import android.os.Message;
Import android.support.annotation.Nullable ;
public class WelcomeActivity the extends Activity {
@Override
public void onCreate (Bundle @Nullable savedInstanceState) {// Note the new version onCreate method of removing the parameters behind the two parameters, there would be a blank page after commissioning
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_welcome);
after entering // 3s MainActivity
new new Handler (new new Handler.Callback () {
@Override
public Boolean the handleMessage (the Message Message) {
startActivity (the Intent new new (WelcomeActivity.this, MainActivity.class));
return to true;
}
.}) sendEmptyMessageDelayed (0,3000 could); / * * Delay 3S /
}
}
All pages must be in
registration in mainifest
// settings from Welcome to the start page for the page
<Activity Android: name =. "welcomeactivity" />
<Activity Android: name =. "MainActivity" />
Problems, most of that blank page appears after commissioning, the solution for heavy-duty onCreate () method while passing only the first mass participation, after an argument deleted.