]>
Commit | Line | Data |
---|---|---|
8188ed47 PT |
1 | package ro.ieval.unical; |
2 | ||
3 | import android.app.Activity; | |
4 | import android.os.Bundle; | |
5 | import android.view.View; | |
6 | import android.widget.Button; | |
7 | import android.widget.EditText; | |
8 | ||
9 | public class loginActivity extends Activity { | |
10 | ||
11 | @Override | |
12 | protected void onCreate(Bundle savedInstanceState) { | |
13 | super.onCreate(savedInstanceState); | |
14 | setContentView(R.layout.login); | |
15 | ||
16 | final EditText user=(EditText) findViewById(R.id.editText1); | |
17 | final EditText pass=(EditText) findViewById(R.id.editText2); | |
18 | final Button logIn=(Button) findViewById(R.id.button1); | |
19 | ||
20 | logIn.setOnClickListener(new View.OnClickListener() { | |
21 | ||
22 | @Override | |
23 | public void onClick(View v) { | |
24 | // TODO Auto-generated method stub | |
25 | if(Utils.loginSuccess(user.getText().toString(),pass.getText().toString())) { | |
26 | setContentView(R.layout.eventview); | |
27 | } | |
28 | } | |
29 | }); | |
30 | } | |
31 | } |