SHARE
TWEET

Untitled

a guest Jun 7th, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.mohammed.nadi.horoscopey;
  2.  
  3. import android.content.Intent;
  4. import android.os.Bundle;
  5. import android.support.v7.app.AppCompatActivity;
  6. import android.view.View;
  7. import android.widget.EditText;
  8. import android.widget.TextView;
  9. import android.widget.Toast;
  10.  
  11. public class signup extends AppCompatActivity {
  12.  
  13.     public TextView sup, act, sin;
  14.     public EditText usrusr, pswd, mail;
  15.     //DB
  16.     RegistrationDB registrationDB;
  17.  
  18.     @Override
  19.     protected void onCreate(Bundle savedInstanceState) {
  20.         super.onCreate(savedInstanceState);
  21.         setContentView(R.layout.activity_signup);
  22.  
  23.         sup = (TextView) findViewById(R.id.sup);
  24.         sin = (TextView) findViewById(R.id.sin);
  25.         act = (TextView) findViewById(R.id.act);
  26.         mail = (EditText) findViewById(R.id.mal);
  27.         pswd = (EditText) findViewById(R.id.pswd);
  28.         usrusr = (EditText) findViewById(R.id.usrusr);
  29.  
  30.         //DB
  31.         registrationDB = new RegistrationDB(this);
  32.     }
  33.  
  34.     public void SignIn(View view) {
  35.         Intent it = new Intent(signup.this, login.class);
  36.         startActivity(it);
  37.     }
  38.  
  39.     public void registBTN(View view) {
  40.  
  41.         String email = mail.getText().toString();
  42.         String user = usrusr.getText().toString();
  43.         String pass = pswd.getText().toString();
  44.  
  45.         long id = registrationDB.addUser(email, user, pass);
  46.         if (id < 0) {
  47.             Toast.makeText(this, "Faild", Toast.LENGTH_SHORT).show();
  48.         } else {
  49.             Toast.makeText(this, "IT WOOORKSSSS", Toast.LENGTH_SHORT).show();
  50.         }
  51.     }
  52.  
  53. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top