Code example for Timer

0
import android.preference.PreferenceManager; 
import android.view.View; 
 
public class SplashActivity extends Activity {
 
	Timer tmrClose = new Timer();
 
	@Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		GlobalInstance.aSplash = this;
		setContentView(R.layout.splash);
 
		SharedPreferences sp = PreferenceManager
				.getDefaultSharedPreferences(this);
		boolean firstStart = sp.getBoolean("firstStart", true);
 
		if (firstStart) {
			findViewById(R.id.tvFirstStart).setVisibility(View.VISIBLE);
		}