title: AutoCompleteTextView DropDown items in TextInputLayout becomes small in Fragments using OutlinedBox.ExposedDropdownMenu
body: <p>I'm using <code>AutoCompleteTextView</code>, <code>TextInputLayout</code>, <code>ExposedDropdownMenu</code> from Material design all together and whenever I try to use it inside a <code>Fragment</code>, the DropDown items becomes small.</p>
  <p><strong>Layout:</strong></p>
  <pre><code>&lt;com.google.android.material.textfield.TextInputLayout
                  android:id=&quot;@+id/responsibility_layout&quot;
                  style=&quot;@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu&quot;
                  android:layout_width=&quot;0dp&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  android:layout_marginStart=&quot;20dp&quot;
                  android:layout_marginLeft=&quot;20dp&quot;
                  app:layout_constraintEnd_toStartOf=&quot;@+id/type_of_transaction&quot;
                  app:layout_constraintStart_toStartOf=&quot;parent&quot;
                  app:layout_constraintTop_toTopOf=&quot;parent&quot;
                  app:startIconDrawable=&quot;@drawable/ic_baseline_person_pin_circle_24&quot;&gt;
  
                  &lt;AutoCompleteTextView
                      android:id=&quot;@+id/res_input&quot;
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:background=&quot;@null&quot;
                      android:hint=&quot;@string/your_respon&quot;
                      android:maxLines=&quot;1&quot; /&gt;
  
              &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  </code></pre>
  <p><strong>Kotlin side (using these codes inside <code>onViewCreated()</code> method):</strong></p>
  <pre><code>val items = listOf(
          resources.getString(R.string.own_first),
          resources.getString(R.string.own_two))
          val adapter = ArrayAdapter(activity!!.applicationContext, R.layout.list_drop,
              items)
          (type_of_transaction.editText as? AutoCompleteTextView)?.setAdapter(adapter)
  
          (type_of_transaction.editText as AutoCompleteTextView).inputType = EditorInfo.TYPE_NULL
          type_of_transaction.onFocusChangeListener =
              View.OnFocusChangeListener { _: View?, hasFocus -&gt;
                  if (hasFocus) {
                      hideKeyboard(activity)
                  }
              }
  </code></pre>
  <p><strong>Proof:</strong></p>
  <p><a href="https://i.stack.imgur.com/rROJ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rROJ0.png" alt="enter image description here" /></a></p>
  <p>The interesting part is that the codes works on <code>Activity</code>. Had no clue of why this happening in a <code>Fragment</code>.</p>
  <p>Any ideas of why this happening? Is this a bug?</p>