the code is here with emulator problrm package com.net.login; import android.app.Activity; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView;
public class login extends Activity { /** Called when the activity is first created. */ String username , password; Button login; TextView tv = new TextView(this); EditText name = new EditText(this); EditText pass =new EditText(this); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ////////////////////////////////////////////// ////////////////////////////////////////////// name = (EditText)findViewById(R.id.user_name); pass = (EditText)findViewById(R.id.password); login = (Button)this.findViewById(R.id.login); //////////////////////////////////////////////////////// username = name.getText().toString(); password = pass.getText().toString(); login.setOnClickListener((android.view.View.OnClickListener) loginListener); } private OnClickListener loginListener = new OnClickListener() { public void onClick(View v) { if (username == "kami" && password == "kami") { //TextView tv = new TextView(this); tv.setText(" Login is Proved"); setContentView(tv); //System.out.println("login proved"); } else { // TextView tv = new TextView(this); tv.setText(" Passwod is incorrect "); setContentView(tv); } //System.out.println("login proved"); } }; } plz help me if anyone know? thanx kamran Manzoor FAST-NU -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en