Advertisement
Guest User

Untitled

a guest
Dec 13th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. Button = buttonX;
  2.  
  3. public void onCreate(Bundle savedInstanceState)
  4. {
  5. super.onCreate(savedInstanceState);
  6. setContentView(R.layout.fourthactivity);
  7.  
  8. buttonX = (Button)findViewById(R.id.button1);
  9.  
  10. buttonX.setOnClickListener(
  11. new View.OnClickListener()
  12. {
  13. public void onClick(View view)
  14. {
  15. EditText text = (EditText)findViewById(R.id.editText1);
  16. String user = text.getText().toString();
  17. EditText text = (EditText)findViewById(R.id.editText2);
  18. String pass = text.getText().toString();
  19.  
  20. if(){
  21. TextView successTextview = (TextView)findViewById(R.id.textView1);
  22. successTextview.setText("Success!");
  23. }
  24. else{
  25. TextView errorTextview = (TextView)findViewById(R.id.textView1);
  26. errorTextview.setText("Error!");
  27. }
  28. }
  29. }
  30. );
  31. }
  32.  
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement