Summary of "안드로이드 앱 만들기 #3 (Intent 화면전환) - 쉽게 앱 만드는 방법 (현직 개발자 설명) , android studio easy tutorial"

Main focus / concepts covered

This tutorial demonstrates how to navigate between Activities (screens) in an Android app using Intents and how to pass data between them.

Key concepts:

Running and testing:


Step-by-step guide (high-level)

  1. Create a project and add a new Activity (e.g., SubActivity) via New → Activity.
  2. Edit layout XMLs:
    • Use a LinearLayout.
    • Add an EditText for input, a Button (Move), and a TextView to show received text.
  3. In MainActivity.java:

    • Declare and initialize UI references: java EditText editText = findViewById(R.id.xxx); Button btnMove = findViewById(R.id.xxx);

    • In btnMove.setOnClickListener: java btnMove.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String text = editText.getText().toString(); Intent i = new Intent(MainActivity.this, SubActivity.class); i.putExtra("sdr", text); startActivity(i); } });

  4. In SubActivity.java: java TextView tvSub = findViewById(R.id.tv_sub); String s = getIntent().getStringExtra("sdr"); tvSub.setText(s);

  5. Fix lifecycle issues by ensuring data is fetched and put into the Intent at the moment the user clicks the button (not at app startup).

Tip: always call editText.getText().toString() inside the click handler so you send the current input.


Troubleshooting tips

Lifecycle/timing bug: do not capture EditText text at startup; read it and call putExtra inside the button’s click handler so the user’s current input is sent.


Additional notes


Main speaker / source

Category ?

Technology


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video