Image for post
Image for post
Photo by Suika Ibuki on Unsplash

Passing data between Activities using Intent in Android

public class LoginActivity extends AppCompatActivity {

EditText edittextfullname,edittextusername;
Button loginbutton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);

edittextfullname=findViewById(R.id.editTextFullName);
edittextusername=findViewById(R.id.editTextUserName);
loginbutton=findViewById(R.id.LoginButton);
}
}
Image for post
Image for post
loginbutton.setOnClickListener(){}
Image for post
Image for post
Image for post
Image for post
Intent intent = new Intent(Source, Destination);
startActivity(intent);
Intent intent = new Intent(LoginActivity.this,SecondActivity.class);
startActivity(intent);
String fullName = edittextfullname.getText().toString();
intent.putExtra("full_name", fullName);
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Android developer in kotlin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store