Hi im just started to learn android Studio and i wanted to have a `AutoCompletetextView` and a Button that adds user input if the user input wasnt listed in the array list.my `AutoCompleteTextView` completely works but i cant get through the onClick listener.any help would be appreciated.

MainActivity.java

```
public class MainActivity extends AppCompatActivity {

    private AutoCompleteTextView actv;
    private Button btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn = findViewById(R.id.btn);
        actv = findViewById(R.id.actv);
        actv.setThreshold(1);

        String[] color = {"blue", "brown", "black", "red", "green", "gray", "violet", "white", "orange"};
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, color);
        actv.setAdapter(adapter);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });

    }
}

```

and xml

```
<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=".MainActivity">

<TextView
    android:id="@+id/textView"
    android:layout_width="100dp"
    android:layout_height="32dp"
    android:layout_marginStart="152dp"
    android:layout_marginLeft="152dp"
    android:layout_marginTop="280dp"
    android:text="Hello World!"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<AutoCompleteTextView
    android:id="@+id/actv"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="204dp"
    android:gravity="center"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<Button
    android:id="@+id/btn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginStart="160dp"
    android:layout_marginLeft="160dp"
    android:layout_marginTop="12dp"
    android:text="Add"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView" />

```