package univ.lille1;

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

/**
 * Activity de la main page
 * 
 * @author pahouayang
 *
 */
public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.extbddmain);

		final Activity activity = this;

		// creer le bouton et lance le get
		final Button buttonGet = (Button) findViewById(R.id.my_button_get);
		buttonGet.setOnClickListener(new OnClickListener() {
			// definition du onclick du bouton get
			public void onClick(View arg0) {
				buttonGet.setClickable(false);
				// call la fontion get
				new GetUsers(activity).execute();
			}
		});
	}

	@Override
	protected void onResume() {
		super.onResume();
	}

}