|
|
@@ -0,0 +1,43 @@ |
|
|
|
package com.nsgk.ruralWeb; |
|
|
|
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
import android.content.Intent; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Handler; |
|
|
|
import android.os.Message; |
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
import androidx.appcompat.app.AppCompatActivity; |
|
|
|
|
|
|
|
public class WelcomeActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
private Handler handler = new Handler() { |
|
|
|
@SuppressLint("HandlerLeak") |
|
|
|
@Override |
|
|
|
public void handleMessage(@NonNull Message msg) { |
|
|
|
|
|
|
|
switch (msg.what) { |
|
|
|
case 1: |
|
|
|
finish(); |
|
|
|
Intent intent = new Intent(WelcomeActivity.this, FullscreenActivity.class); |
|
|
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
|
|
|
startActivity(intent); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
this.setContentView(R.layout.activity_welcome); |
|
|
|
|
|
|
|
|
|
|
|
handler.postDelayed(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
handler.sendEmptyMessage(1); |
|
|
|
} |
|
|
|
}, 3000); |
|
|
|
} |
|
|
|
} |