Good morning,

I'm a beginner developer on Android.

I created an UI with two EditText and a button.
I want to create an application using twitter (API JTwitter), the the
first stage is to connect to twitter.

On myApp.java I use this:

public class myApp extends Activity implements OnClickListener{
        Twitter twitter;

        EditText TLogin;
        EditText TPassword;
        Button Connect;

        public void onClick(View src) {
        try{

              String login = TLogin.getText().toString();
              String password = TPassword.getText().toString();
              if(!login.equals("") && !password.equals("")){
                  twitter=new Twitter(login,password);
                  if(!twitter.isValidLogin()){

                          TLogin.setText("not valid");
                          TPassword.setText("not valid");
                  }
                  else
                          twitter.setStatus("Connected");
              }

            }
                catch(Exception e){}
        }

        public void onCreate(Bundle savedInstanceState) {
        try{
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // find views by id
        Connect= (Button) findViewById(R.id.Connect);
        TLogin = (EditText) findViewById(R.id.TLogin);
        TPassword = (EditText) findViewById(R.id.TPassword);

        // Add listener
        Connect.setOnClickListener(this);
        }
        catch(Exception e){}
    }
}


When I run this, I get nothing... I can't find where is the problem :s
please help me :s

Else, if I want to call an othor layout using this button, how can I
do it?


Thank you.

-- 
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

Reply via email to