fork download
  1. VideoView vv_splash;
  2. @Override
  3. protected void onCreate(@Nullable Bundle savedInstanceState) {
  4. super.onCreate(savedInstanceState);
  5. vv_splash = (VideoView) findViewById(R.id.vv_splash);
  6. // String uriPath = ;
  7. // Log.d("aaa", uriPath);
  8. // Uri uri = ;
  9. vv_splash.setVideoURI(Uri.parse("android.resource://"+ getPackageName() +"/" + R.raw.puppy));
  10. vv_splash.requestFocus();
  11. vv_splash.start();
  12. int SPLASH_DISPLAY_LENGTH = 3000;
  13. new Handler().postDelayed(new Runnable() {
  14. @Override
  15. public void run() {
  16. // Intent mainIntent = new Intent(SplashScreen.this, Login.class);
  17. // startActivity(mainIntent);
  18. // finish();
  19. }
  20. }, SPLASH_DISPLAY_LENGTH);
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
VideoView vv_splash;
^
Main.java:3: error: class, interface, or enum expected
    protected void onCreate(@Nullable Bundle savedInstanceState) {
              ^
Main.java:3: error: class, interface, or enum expected
    protected void onCreate(@Nullable Bundle savedInstanceState) {
                                      ^
Main.java:5: error: class, interface, or enum expected
        vv_splash = (VideoView) findViewById(R.id.vv_splash);
        ^
Main.java:9: error: class, interface, or enum expected
        vv_splash.setVideoURI(Uri.parse("android.resource://"+ getPackageName() +"/" + R.raw.puppy));
        ^
Main.java:10: error: class, interface, or enum expected
        vv_splash.requestFocus();
        ^
Main.java:11: error: class, interface, or enum expected
        vv_splash.start();
        ^
Main.java:12: error: class, interface, or enum expected
        int SPLASH_DISPLAY_LENGTH = 3000;
        ^
Main.java:13: error: class, interface, or enum expected
        new Handler().postDelayed(new Runnable() {
        ^
Main.java:15: error: class, interface, or enum expected
            public void run() {
                   ^
Main.java:21: error: class, interface, or enum expected
    }
    ^
11 errors
stdout
Standard output is empty