Q:

Android crash on CompletationHintView

I have a problem with android:completionHintView in a AutoCompleteTextView.
I have in my layout this AutoCompleteTextView:
<AutoCompleteTextView
            android:id="@+id/customer_autocomplete"
            android:layout_width="match_parent"
            android:completionHintView="@layout/customer_autocomplet_hint"
            android:completionHint="@string/customer_label"
            android:popupBackground="#F00"
            android:dropDownHeight="wrap_content"
            android:dropDownVerticalOffset="0dp"
            android:dropDownAnchor="@+id/dropdownDivider"
            android:dropDownWidth="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="18dp"
            android:fontFamily="@font/robotomedium"/>

The interesting part is:
android:completionHintView="@layout/customer_autocomplete_hint"
android:completionHint="@string/customer_label"
Because then I have a layout named customer_autocomplete_hint:
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:padding="10dp"
    android:text="@string/customer_label"
    android:textColor="#FFF" android:textSize="16sp" />

And it Work, but my question is:
Why If I put anything id instead of
android:id="@android:id/text1"

the app crash with following error?

android.view.InflateException: Binary XML file line #147: Binary XML
  file line #15: Error inflating class AutoCompleteTextView
          Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class AutoCompleteTextView
          Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void
  android.widget.TextView.setText(java.lang.CharSequence)' on a null
  object reference

NOTE
I haven't any references in my code that make a setText on resource with @+id/text1 or others or android:id="@id/text1

A:

That's because AutoCompleteTextView looks for TextView with ID R.id.text1 when setting completion hint as specified in android:completionHint in your XML layout. You can see it in AutoCompleteTextView source code.
public void setCompletionHint(CharSequence hint) {
    mHintText = hint;
    if (hint != null) {
        if (mHintView == null) {
            final TextView hintView = (TextView) LayoutInflater.from(mPopupContext).inflate(
                    mHintResource, null).findViewById(R.id.text1);  // Here it looks for text1 ID
            hintView.setText(mHintText);
            mHintView = hintView;
            mPopup.setPromptView(hintView);
        } else {
            mHintView.setText(hint);
        }
    } else {
        mPopup.setPromptView(null);
        mHintView = null;
    }
}

