SHARE
TWEET

Untitled

a guest Jun 7th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class signup extends AppCompatActivity {
  2.  
  3.     public TextView sup, act, sin;
  4.     public EditText usrusr, pswd, mail;
  5.     //DB
  6.     RegistrationDB registrationDB;
  7.  
  8.     @Override
  9.     protected void onCreate(Bundle savedInstanceState) {
  10.         super.onCreate(savedInstanceState);
  11.         setContentView(R.layout.activity_signup);
  12.  
  13.         sup = (TextView) findViewById(R.id.sup);
  14.         sin = (TextView) findViewById(R.id.sin);
  15.         act = (TextView) findViewById(R.id.act);
  16.         mail = (EditText) findViewById(R.id.mal);
  17.         pswd = (EditText) findViewById(R.id.pswd);
  18.         usrusr = (EditText) findViewById(R.id.usrusr);
  19.  
  20.         //DB
  21.         registrationDB = new RegistrationDB(this);
  22.     }
  23.  
  24.     public void SignIn(View view) {
  25.         Intent it = new Intent(signup.this, login.class);
  26.         startActivity(it);
  27.     }
  28.  
  29.     public void registBTN(View view) {
  30.  
  31.         String email = mail.getText().toString();
  32.         String user = usrusr.getText().toString();
  33.         String pass = pswd.getText().toString();
  34.  
  35.         long id = registrationDB.addUser(email, user, pass);
  36.         if (id < 0) {
  37.             Toast.makeText(this, "Faild", Toast.LENGTH_SHORT).show();
  38.         } else {
  39.             Toast.makeText(this, "IT WOOORKSSSS", Toast.LENGTH_SHORT).show();
  40.         }
  41.     }
  42.  
  43. }
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
 
Top