package com.eni.android.bloqueruithreadexemple;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BlockUiThreadActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_block_ui_thread);
        
        final Button blockUiThread = (Button) findViewById(R.id.blockUiThreadBtn);
        blockUiThread.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				try {
					Thread.sleep(15000L);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		});
    }
    
}
