-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainActivity.java
More file actions
32 lines (27 loc) · 851 Bytes
/
Copy pathMainActivity.java
File metadata and controls
32 lines (27 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.example.hydrationapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Thread splash = new Thread(){
public void run()
{
try
{
sleep(1500);
Intent intent = new Intent(getApplicationContext(),HomeActivity.class);
startActivity(intent);
finish();
}catch (Exception e)
{
e.printStackTrace();
}
}
};
splash.start();
}
}