Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
package com.isetn.android;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import an...
Upcoming SlideShare
Loading in …5
×

Accueil.java

391 views

Published on

java

Published in: Education
  • Login to see the comments

  • Be the first to like this

Accueil.java

  1. 1. package com.isetn.android; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import android.widget.*; //import android.widget.Toast; public class Accueil extends Activity { Button buttconnexion; Button buttquitter; EditText edit1; EditText edit2; String login; String mp; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_accueil); edit1= (EditText) findViewById(R.id.edit1); edit2= (EditText) findViewById(R.id.edit2); buttconnexion= (Button) findViewById(R.id.buttconnexion); buttquitter= (Button) findViewById(R.id.buttquitter); buttquitter.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v){ finish(); } }); buttconnexion.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v){ login= edit1.getText().toString() ; mp=edit2.getText().toString(); if (login.equalsIgnoreCase("user")& (mp.equalsIgnoreCase(""))) { Intent intent= new Intent(Accueil.this , Menu.class); startActivity(intent); } else { Toast.makeText(getApplicationContext(), "echec.!!!!", 2000).show(); } } });; } }

×