i want to add intent in main activity -
You want to take the name of the person for the next activity and if the login is not ok, it will show the toast that it does not work And just show the toast. What should be included in the next activity and what is wrong with this code @Override protected void onCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState ); SetContentView (R.layout.activity_main); Find the last edit text EText1 = (edit text) VVBID (RED Edit Text 1); Find the last edit text EText2 = (EditText) ViewById (R.id.editText2); Find the last button BTN1 = (button) VibibIID (R.B. button 1); . Btn1.setOnClickListener (New View.OnClickListener) {Public Zero onClick (see v) {String str = eText1.getText () toString (); String Log = "Malaica"; if (str == log) {intent = New intent (getApplicationContext (), FirstButton.class); intent.putExtra ("welcome", log in); else {toast TOS = Toast.makeText (getApplication (), "wrong", toast.LENGTH_SHORT); tos .show ();}}}); ...