Skip to content

Android change of layout or activity with fade-in and fade-out issues hence without button, HELP! #857

Description

@NahashonThiongo

public class MainActivity extends AppCompatActivity {
private static int WELCOME_TIMEOUT = 4000;
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);;
setContentView(R.layout.activity_main);
new Handler().postDelayed(new Runnable () {
@OverRide
public void run() {
Intent welcome = new Intent (MainActivity.this, SecondActivity.class);
startActivity(welcome);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
finish();
}
}, WELCOME_TIMEOUT);
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions