Why is my "addTextChangedListener" on android not working? Here is my code:

**activity\_ticketing.xml**

```
 <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".TicketingMain.Ticketing">

    <!-- Main Content -->

    <!-- HEADING -->

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/button_logout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_margin="16dp"

        android:layout_marginStart="28dp"
        android:layout_marginBottom="100dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/icon_exit" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/materialCardView"
        android:layout_width="match_parent"
        android:layout_height="75dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="16dp"
        android:minHeight="200dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/constraintLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/textView_route"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="28dp"
                android:text="Tacloban - Tanawan"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="0.285" />

            <TextView
                android:id="@+id/textView_vehicle"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="16dp"
                android:text="ZZZ999"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="@+id/textView_route"
                app:layout_constraintStart_toStartOf="@+id/textView_route"
                app:layout_constraintTop_toBottomOf="@+id/textView_route" />

            <TextView
                android:id="@+id/textView_driver"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:text="Driver Name"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintStart_toEndOf="@+id/textView_route"
                app:layout_constraintTop_toTopOf="@+id/textView_route" />

            <TextView
                android:id="@+id/textView_conductor"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="8dp"
                android:text="Conductor Name"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintStart_toEndOf="@+id/textView_vehicle"
                app:layout_constraintTop_toBottomOf="@+id/textView_driver" />

            <TextView
                android:id="@+id/textView_numberOfPassengers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:text="0"
                android:textSize="24sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="@+id/textView3"
                app:layout_constraintTop_toBottomOf="@+id/textView3" />

            <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="8dp"
                android:text="Passengers"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>
    <!-- HEADING END -->

    <!-- ROUTEPOST ORIGIN -->
    <!-- ROUTEPOST ORIGIN END -->

    <!-- MAIN -->
    <com.google.android.material.card.MaterialCardView
        android:id="@+id/materialCardView2"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/materialCardView">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!-- spinner_direction -->

            <Spinner
                android:id="@+id/spinner_direction"
                android:layout_width="200dp"
                android:layout_height="0dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="16dp"
                android:textAlignment="center"
                app:layout_constraintBottom_toBottomOf="@+id/textView"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/textView"
                app:layout_constraintTop_toTopOf="parent" />

            <!-- textView_currentPost -->
            <TextView
                android:id="@+id/textView_currentPost"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/border_box"
                android:text="Current"
                android:textAlignment="center"
                android:textAllCaps="true"
                android:textSize="20sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="@+id/button_prev"
                app:layout_constraintEnd_toStartOf="@+id/button_next"
                app:layout_constraintStart_toEndOf="@+id/button_prev"
                app:layout_constraintTop_toTopOf="@+id/button_prev" />

            <!-- button_next -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/button_next"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:textAlignment="center"
                app:icon="@drawable/ic_right_arrow"
                app:iconGravity="textStart"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/textView_currentPost"
                app:layout_constraintTop_toBottomOf="@+id/spinner_direction" />

            <!-- button_prev -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/button_prev"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:textAlignment="center"
                android:textStyle="bold"
                app:icon="@drawable/ic_left"
                app:iconGravity="textStart"
                app:layout_constraintEnd_toStartOf="@+id/textView_currentPost"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/spinner_direction" />

            <!-- button_postCurrentRoutePost -->

            <!-- button_logout -->

            <!-- textView = "Direction" -->
            <TextView
                android:id="@+id/textView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp"
                android:text="Direction"
                android:textSize="24sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <!-- textView_currentLocation -->
            <TextView
                android:id="@+id/textView_currentLocation"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:text="No current location set"
                android:textSize="24sp"
                app:layout_constraintEnd_toEndOf="@+id/button_next"
                app:layout_constraintStart_toStartOf="@+id/button_prev"
                app:layout_constraintTop_toBottomOf="@+id/textView_currentPost" />

            <!-- button_nextDestination -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/button_nextDestination"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:textAlignment="center"
                app:icon="@drawable/ic_right_arrow"
                app:iconGravity="textStart"
                app:layout_constraintEnd_toEndOf="@+id/textView_currentLocation"
                app:layout_constraintStart_toEndOf="@+id/textView_currentPost"
                app:layout_constraintTop_toBottomOf="@+id/textView_currentLocation" />

            <!-- button_prevDestination -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/button_prevDestination"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="8dp"
                android:clickable="true"
                android:textAlignment="center"
                android:textStyle="bold"
                app:icon="@drawable/ic_left"
                app:iconGravity="textStart"
                app:layout_constraintEnd_toStartOf="@+id/textView_currentPost"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/textView_currentLocation" />

            <!-- textView_currentPostDestination -->
            <TextView
                android:id="@+id/textView_currentPostDestination"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/border_box"
                android:text="Current"
                android:textAlignment="center"
                android:textAllCaps="true"
                android:textSize="20sp"
                android:textStyle="bold"
                android:clickable="true"
                android:onClick="onClick"
                app:layout_constraintBottom_toBottomOf="@+id/button_prevDestination"
                app:layout_constraintEnd_toStartOf="@+id/button_nextDestination"
                app:layout_constraintStart_toEndOf="@+id/button_prevDestination"
                app:layout_constraintTop_toTopOf="@+id/button_nextDestination" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/button_postDestination"
                style="@style/Widget.MaterialComponents.Button"
                android:layout_width="0dp"
                android:layout_height="65dp"
                android:layout_marginTop="8dp"
                android:text="Submit Destination"
                android:textAlignment="center"
                app:iconGravity="textStart"
                app:layout_constraintEnd_toEndOf="@+id/button_nextDestination"
                app:layout_constraintStart_toStartOf="@+id/textView_currentPostDestination"
                app:layout_constraintTop_toBottomOf="@+id/textView_currentPostDestination" />

            <!-- RECEIPT -->
            <com.google.android.material.card.MaterialCardView
                android:id="@+id/materialCardView3"
                android:layout_width="347dp"
                android:layout_height="332dp"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="1.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/button_postDestination">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <TextView
                        android:id="@+id/textView4"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="24dp"
                        android:layout_marginTop="24dp"
                        android:text="Destination"
                        android:textSize="18sp"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/textView_receiptDestination"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="16dp"
                        android:text="Tacloban - Tanawan"
                        android:textSize="18sp"
                        android:textStyle="bold"
                        app:layout_constraintStart_toEndOf="@+id/textView4"
                        app:layout_constraintTop_toTopOf="@+id/textView4" />

                    <TextView
                        android:id="@+id/textView6"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="24dp"
                        android:text="Passengers"
                        android:textSize="18sp"
                        app:layout_constraintStart_toStartOf="@+id/textView4"
                        app:layout_constraintTop_toBottomOf="@+id/textView4" />

                    <TextView
                        android:id="@+id/textView_receiptPassengers"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="16dp"
                        android:text="0"
                        android:textSize="18sp"
                        android:textStyle="bold"
                        app:layout_constraintStart_toEndOf="@+id/textView6"
                        app:layout_constraintTop_toTopOf="@+id/textView6" />

                    <TextView
                        android:id="@+id/textView8"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="32dp"
                        android:text="Fare"
                        android:textSize="18sp"
                        app:layout_constraintStart_toStartOf="@+id/textView6"
                        app:layout_constraintTop_toBottomOf="@+id/textView6" />

                    <TextView
                        android:id="@+id/textView_receiptFare"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="0.00"
                        android:textSize="18sp"
                        android:textStyle="bold"
                        app:layout_constraintStart_toStartOf="@+id/textView_receiptPassengers"
                        app:layout_constraintTop_toTopOf="@+id/textView8" />

                    <TextView
                        android:id="@+id/textView10"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="24dp"
                        android:text="Total Due"
                        android:textSize="18sp"
                        app:layout_constraintStart_toStartOf="@+id/textView8"
                        app:layout_constraintTop_toBottomOf="@+id/textView8" />

                    <TextView
                        android:id="@+id/textView_receiptTotal"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="0.00"
                        android:textSize="18sp"
                        android:textStyle="bold"
                        app:layout_constraintStart_toStartOf="@+id/textView_receiptFare"
                        app:layout_constraintTop_toTopOf="@+id/textView10" />

                    <com.google.android.material.card.MaterialCardView
                        android:id="@+id/materialCardView4"
                        android:layout_width="108dp"
                        android:layout_height="97dp"
                        android:layout_marginEnd="8dp"
                        app:layout_constraintBottom_toBottomOf="@+id/textView_receiptTotal"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/textView_receiptDestination">

                        <ImageView
                            android:id="@+id/imageView_qrCode"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_centerHorizontal="true" />

                    </com.google.android.material.card.MaterialCardView>

                    <RadioGroup
                        android:id="@+id/radioGroup_discount"
                        android:layout_width="205dp"
                        android:layout_height="106dp"
                        android:layout_marginEnd="140dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/textView10"
                        app:layout_constraintVertical_bias="0.615">

                        <RadioButton
                            android:id="@+id/radioButton_noDiscount"
                            android:layout_width="128dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="60dp"
                            android:checked="true"
                            android:text="No Discount"
                            android:textSize="12sp"
                            android:textStyle="bold"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/textView10" />

                        <RadioButton
                            android:id="@+id/radioButton_ssDiscount"
                            android:layout_width="125dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="60dp"
                            android:text="Senior/Student"
                            android:textSize="12sp"
                            android:textStyle="bold"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/textView10" />

                        <RadioButton
                            android:id="@+id/radioButton_spDiscount"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="60dp"
                            android:text="Special Discount"
                            android:textSize="12sp"
                            android:textStyle="bold" />

                    </RadioGroup>

                    <Button
                        android:id="@+id/button_accept"
                        android:layout_width="108dp"
                        android:layout_height="74dp"
                        android:text="Accept"
                        app:backgroundTint="#009688"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="@+id/materialCardView4"
                        app:layout_constraintStart_toStartOf="@+id/materialCardView4"
                        app:layout_constraintTop_toBottomOf="@+id/materialCardView4" />

                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.google.android.material.card.MaterialCardView>

<!--            <SearchView-->
<!--                android:layout_width="0dp"-->
<!--                android:layout_height="0dp"-->
<!--                android:id="@+id/search"-->
<!--                app:layout_constraintBottom_toBottomOf="@+id/button_postDestination"-->
<!--                app:layout_constraintEnd_toEndOf="@+id/button_prevDestination"-->
<!--                app:layout_constraintStart_toStartOf="@+id/button_prevDestination"-->
<!--                app:layout_constraintTop_toTopOf="@+id/button_postDestination" />-->

                        <com.google.android.material.textfield.TextInputLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:id="@+id/editText"
                app:layout_constraintBottom_toBottomOf="@+id/button_postDestination"
                app:layout_constraintEnd_toEndOf="@+id/button_prevDestination"
                app:layout_constraintStart_toStartOf="@+id/button_prevDestination"
                app:layout_constraintTop_toBottomOf="@+id/button_prevDestination">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/textKm"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Km" />
            </com.google.android.material.textfield.TextInputLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>
    <!-- MAIN END -->
    <!-- MAIN -->
    <!-- HEADING -->

    <!-- LOGOUT -->
    <!-- LOGOUT END -->

</androidx.constraintlayout.widget.ConstraintLayout>

```

**Ticketing.java**

```
EditText editText;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ticketing);
    editText = (EditText) findViewById(R.id.textKm);
    editText.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            Log.e("TEXT", "A");
        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            Log.e("TEXT", "A");
        }

        @Override
        public void afterTextChanged(Editable s) {
            Log.e("TEXT", "A");
        }
    });
}

```

I don't get any error. On debugging, it doesn't stop on any of the overrides.