0Pricing
Android Academy · Lesson

Handling User Input

Respond to button clicks, read text from EditText, validate input, and provide user feedback with Toast messages.

Connecting UI to Code

Building a layout is just the first step. You also need to:

  • Read what the user typed in an EditText
  • Respond to button clicks
  • Update TextViews with new values

This lesson shows how to wire up UI elements using ViewBinding — the modern, type-safe approach.

Enabling ViewBinding

Enable ViewBinding in your app/build.gradle:

// app/build.gradle (inside android { })
android {
    ...
    buildFeatures {
        viewBinding = true
    }
}

All lessons in this course

  1. Project Structure & Manifest
  2. Activities & Lifecycle
  3. Layouts & Views
  4. Handling User Input
  5. Intents & Navigation
  6. Fragments
  7. Permissions & Runtime Requests
← Back to Android Academy