I have a simple dialog which contains a note field, and when i long press on an item, this happens (I attach different status, to better understand the problem)
Now, here's what I already tried:
Custom layout changes. What i do is using the normal MaterialAlertDialogBuilder with the setview method. The view itself is just a text field, but I also tried to encapsulate it in a frame layout, or to put a simple textview with selectable text. No changes. Here's the kotlin part
// Native dialog MaterialAlertDialogBuilder(act) .setView(dialogNotesBinding.root) .setTitle(notesTitle) .setIcon(R.drawable.ic_note_24dp) .setPositiveButton(resources.getString(android.R.string.ok)) { dialog, _ -> ... } .setNegativeButton(resources.getString(android.R.string.cancel)) { dialog, _ -> dialog.dismiss() } .show()
And here's the custom layout:
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/favoritesNotesLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
... >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/favoritesNotes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
... />
</com.google.android.material.textfield.TextInputLayout>
- Change Material components version: I tried 1.12.0 and 1.13.0 alpha, no changes
I'm out of ideas.