Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lokadin.sandy.example.com.lokadin;
- import android.content.Intent;
- import android.os.Bundle;
- import android.support.v7.app.AppCompatActivity;
- import android.view.View;
- import android.widget.LinearLayout;
- /**
- * Created by sandy on 7/9/2017.
- */
- public class SplashScreenActivity extends AppCompatActivity {
- LinearLayout linlaHeaderProgress;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_splash_screen);
- linlaHeaderProgress = (LinearLayout) findViewById(R.id.linlaHeaderProgress);
- linlaHeaderProgress.setVisibility(View.VISIBLE);
- Thread timerThread = new Thread(){
- public void run(){
- try{
- sleep(3000);
- }catch(InterruptedException e){
- e.printStackTrace();
- }finally{
- Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
- startActivity(intent);
- }
- }
- };
- timerThread.start();
- }
- @Override
- protected void onPause() {
- // TODO Auto-generated method stub
- super.onPause();
- finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement