]> iEval git - unical.git/blobdiff - src/ro/ieval/unical/loginActivity.java
Add login screen
[unical.git] / src / ro / ieval / unical / loginActivity.java
diff --git a/src/ro/ieval/unical/loginActivity.java b/src/ro/ieval/unical/loginActivity.java
new file mode 100644 (file)
index 0000000..a4ac90b
--- /dev/null
@@ -0,0 +1,31 @@
+package ro.ieval.unical;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+public class loginActivity extends Activity {
+       
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               super.onCreate(savedInstanceState);
+               setContentView(R.layout.login);
+               
+               final EditText user=(EditText) findViewById(R.id.editText1);
+               final EditText pass=(EditText) findViewById(R.id.editText2);
+               final Button logIn=(Button) findViewById(R.id.button1);
+       
+               logIn.setOnClickListener(new View.OnClickListener() {
+                       
+                       @Override
+                       public void onClick(View v) {
+                               // TODO Auto-generated method stub
+                               if(Utils.loginSuccess(user.getText().toString(),pass.getText().toString())) {
+                                       setContentView(R.layout.eventview);
+                               }
+                       }
+               });
+       }
+}
This page took 0.022649 seconds and 4 git commands to generate.