I have an AutoCompleteTextView in my app, at the bottom of the layout. When user inputs data, suggestion popup with items should appear. All works as expected on Android Samsung device with OS 6.0.1:

But for Android 8.0.0 (LG device and also an emulator 8.1.0), I don't see such popup, I suppose it showing behind keyboard for some reason (Because when I clicked back button nothing happened - popup handled that event, and only on second back click keyboard disappeared):

My AutocompleteTextview:
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout ...
<android.support.v7.widget.AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@drawable/thin_square_border"
android:maxLines="3"
android:minHeight="60sp"
android:padding="12dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:textColor="@color/charcoalgray"
/>
</LinearLayout>
</ScrollView>
I've tried dropDownAnchor on view above, and android:dropDownHeight="wrap_content" but that didn't help.
I found this solution that works for me in Oreo and Pie. I added this to my fragment:
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
This seems like a bug introduced in Oreo. Hope this helps for your case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With